@across-protocol/sdk 4.2.16-alpha.0 → 4.2.16-alpha.2
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 +6 -2
- package/dist/cjs/arch/evm/SpokeUtils.js +21 -6
- package/dist/cjs/arch/evm/SpokeUtils.js.map +1 -1
- package/dist/cjs/arch/svm/SpokeUtils.d.ts +9 -5
- package/dist/cjs/arch/svm/SpokeUtils.js +70 -71
- package/dist/cjs/arch/svm/SpokeUtils.js.map +1 -1
- package/dist/cjs/arch/svm/utils.d.ts +3 -5
- package/dist/cjs/arch/svm/utils.js +20 -28
- 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 +4 -2
- package/dist/cjs/clients/AcrossConfigStoreClient/AcrossConfigStoreClient.js.map +1 -1
- package/dist/cjs/clients/BundleDataClient/BundleDataClient.d.ts +4 -4
- package/dist/cjs/clients/BundleDataClient/BundleDataClient.js +60 -56
- 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 +2 -1
- package/dist/cjs/clients/BundleDataClient/utils/FillUtils.js +3 -2
- package/dist/cjs/clients/BundleDataClient/utils/FillUtils.js.map +1 -1
- package/dist/cjs/clients/BundleDataClient/utils/MerkleTreeUtils.js +5 -1
- 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 +63 -63
- package/dist/cjs/clients/BundleDataClient/utils/SuperstructUtils.js +11 -8
- 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 +83 -58
- 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 +64 -45
- package/dist/cjs/clients/SpokePoolClient/SpokePoolClient.js.map +1 -1
- package/dist/cjs/clients/mocks/MockHubPoolClient.d.ts +9 -9
- package/dist/cjs/clients/mocks/MockHubPoolClient.js +15 -9
- package/dist/cjs/clients/mocks/MockHubPoolClient.js.map +1 -1
- package/dist/cjs/clients/mocks/MockSpokePoolClient.d.ts +5 -3
- package/dist/cjs/clients/mocks/MockSpokePoolClient.js +40 -36
- 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 +3 -4
- package/dist/cjs/clients/mocks/MockSvmCpiEventsClient.js.map +1 -1
- package/dist/cjs/clients/mocks/MockSvmSpokePoolClient.d.ts +3 -3
- 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 +19 -14
- package/dist/cjs/interfaces/SpokePool.d.ts +13 -13
- package/dist/cjs/relayFeeCalculator/chain-queries/baseQuery.d.ts +6 -6
- package/dist/cjs/relayFeeCalculator/chain-queries/baseQuery.js +10 -10
- package/dist/cjs/relayFeeCalculator/chain-queries/baseQuery.js.map +1 -1
- package/dist/cjs/relayFeeCalculator/chain-queries/svmQuery.d.ts +5 -5
- package/dist/cjs/relayFeeCalculator/chain-queries/svmQuery.js +42 -49
- package/dist/cjs/relayFeeCalculator/chain-queries/svmQuery.js.map +1 -1
- package/dist/cjs/relayFeeCalculator/relayFeeCalculator.d.ts +5 -5
- package/dist/cjs/relayFeeCalculator/relayFeeCalculator.js +7 -7
- package/dist/cjs/relayFeeCalculator/relayFeeCalculator.js.map +1 -1
- package/dist/cjs/utils/AddressUtils.d.ts +12 -13
- package/dist/cjs/utils/AddressUtils.js +44 -46
- package/dist/cjs/utils/AddressUtils.js.map +1 -1
- package/dist/cjs/utils/EventUtils.js +1 -1
- package/dist/cjs/utils/EventUtils.js.map +1 -1
- package/dist/cjs/utils/SpokeUtils.d.ts +3 -3
- package/dist/cjs/utils/SpokeUtils.js +4 -22
- package/dist/cjs/utils/SpokeUtils.js.map +1 -1
- package/dist/cjs/utils/TokenUtils.d.ts +4 -4
- package/dist/cjs/utils/TokenUtils.js +4 -6
- package/dist/cjs/utils/TokenUtils.js.map +1 -1
- package/dist/esm/arch/evm/SpokeUtils.d.ts +6 -2
- package/dist/esm/arch/evm/SpokeUtils.js +22 -7
- package/dist/esm/arch/evm/SpokeUtils.js.map +1 -1
- package/dist/esm/arch/svm/SpokeUtils.d.ts +9 -5
- package/dist/esm/arch/svm/SpokeUtils.js +74 -75
- package/dist/esm/arch/svm/SpokeUtils.js.map +1 -1
- package/dist/esm/arch/svm/utils.d.ts +6 -8
- package/dist/esm/arch/svm/utils.js +21 -27
- 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 +4 -2
- package/dist/esm/clients/AcrossConfigStoreClient/AcrossConfigStoreClient.js.map +1 -1
- package/dist/esm/clients/BundleDataClient/BundleDataClient.d.ts +4 -4
- package/dist/esm/clients/BundleDataClient/BundleDataClient.js +61 -57
- 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 +2 -1
- package/dist/esm/clients/BundleDataClient/utils/FillUtils.js +5 -3
- package/dist/esm/clients/BundleDataClient/utils/FillUtils.js.map +1 -1
- package/dist/esm/clients/BundleDataClient/utils/MerkleTreeUtils.js +5 -1
- 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 +63 -63
- package/dist/esm/clients/BundleDataClient/utils/SuperstructUtils.js +12 -9
- package/dist/esm/clients/BundleDataClient/utils/SuperstructUtils.js.map +1 -1
- package/dist/esm/clients/HubPoolClient.d.ts +23 -22
- package/dist/esm/clients/HubPoolClient.js +97 -63
- 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 +67 -47
- package/dist/esm/clients/SpokePoolClient/SpokePoolClient.js.map +1 -1
- package/dist/esm/clients/mocks/MockHubPoolClient.d.ts +9 -9
- package/dist/esm/clients/mocks/MockHubPoolClient.js +16 -10
- package/dist/esm/clients/mocks/MockHubPoolClient.js.map +1 -1
- package/dist/esm/clients/mocks/MockSpokePoolClient.d.ts +5 -3
- package/dist/esm/clients/mocks/MockSpokePoolClient.js +42 -38
- 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 +4 -5
- package/dist/esm/clients/mocks/MockSvmCpiEventsClient.js.map +1 -1
- package/dist/esm/clients/mocks/MockSvmSpokePoolClient.d.ts +3 -3
- 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 +19 -14
- package/dist/esm/interfaces/SpokePool.d.ts +13 -13
- package/dist/esm/relayFeeCalculator/chain-queries/baseQuery.d.ts +6 -6
- package/dist/esm/relayFeeCalculator/chain-queries/baseQuery.js +11 -11
- package/dist/esm/relayFeeCalculator/chain-queries/baseQuery.js.map +1 -1
- package/dist/esm/relayFeeCalculator/chain-queries/svmQuery.d.ts +6 -6
- package/dist/esm/relayFeeCalculator/chain-queries/svmQuery.js +44 -51
- package/dist/esm/relayFeeCalculator/chain-queries/svmQuery.js.map +1 -1
- package/dist/esm/relayFeeCalculator/relayFeeCalculator.d.ts +5 -5
- package/dist/esm/relayFeeCalculator/relayFeeCalculator.js +8 -8
- package/dist/esm/relayFeeCalculator/relayFeeCalculator.js.map +1 -1
- package/dist/esm/utils/AddressUtils.d.ts +13 -14
- package/dist/esm/utils/AddressUtils.js +50 -56
- package/dist/esm/utils/AddressUtils.js.map +1 -1
- package/dist/esm/utils/EventUtils.js +2 -2
- package/dist/esm/utils/EventUtils.js.map +1 -1
- package/dist/esm/utils/SpokeUtils.d.ts +3 -8
- package/dist/esm/utils/SpokeUtils.js +4 -26
- package/dist/esm/utils/SpokeUtils.js.map +1 -1
- package/dist/esm/utils/TokenUtils.d.ts +4 -16
- package/dist/esm/utils/TokenUtils.js +5 -7
- package/dist/esm/utils/TokenUtils.js.map +1 -1
- package/dist/types/arch/evm/SpokeUtils.d.ts +6 -2
- package/dist/types/arch/evm/SpokeUtils.d.ts.map +1 -1
- package/dist/types/arch/svm/SpokeUtils.d.ts +9 -5
- package/dist/types/arch/svm/SpokeUtils.d.ts.map +1 -1
- package/dist/types/arch/svm/utils.d.ts +6 -8
- 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 +4 -4
- 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 +2 -1
- 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 +63 -63
- package/dist/types/clients/BundleDataClient/utils/SuperstructUtils.d.ts.map +1 -1
- package/dist/types/clients/HubPoolClient.d.ts +23 -22
- 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/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 +5 -3
- 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 +3 -3
- package/dist/types/clients/mocks/MockSvmSpokePoolClient.d.ts.map +1 -1
- package/dist/types/interfaces/HubPool.d.ts +19 -14
- package/dist/types/interfaces/HubPool.d.ts.map +1 -1
- package/dist/types/interfaces/SpokePool.d.ts +13 -13
- package/dist/types/interfaces/SpokePool.d.ts.map +1 -1
- package/dist/types/relayFeeCalculator/chain-queries/baseQuery.d.ts +6 -6
- package/dist/types/relayFeeCalculator/chain-queries/baseQuery.d.ts.map +1 -1
- package/dist/types/relayFeeCalculator/chain-queries/svmQuery.d.ts +6 -6
- package/dist/types/relayFeeCalculator/chain-queries/svmQuery.d.ts.map +1 -1
- package/dist/types/relayFeeCalculator/relayFeeCalculator.d.ts +5 -5
- package/dist/types/relayFeeCalculator/relayFeeCalculator.d.ts.map +1 -1
- package/dist/types/utils/AddressUtils.d.ts +13 -14
- package/dist/types/utils/AddressUtils.d.ts.map +1 -1
- package/dist/types/utils/SpokeUtils.d.ts +3 -8
- package/dist/types/utils/SpokeUtils.d.ts.map +1 -1
- package/dist/types/utils/TokenUtils.d.ts +4 -16
- package/dist/types/utils/TokenUtils.d.ts.map +1 -1
- package/package.json +2 -3
- package/src/arch/evm/SpokeUtils.ts +52 -12
- package/src/arch/svm/SpokeUtils.ts +108 -59
- package/src/arch/svm/utils.ts +11 -20
- package/src/clients/AcrossConfigStoreClient/AcrossConfigStoreClient.ts +7 -4
- package/src/clients/BundleDataClient/BundleDataClient.ts +57 -53
- package/src/clients/BundleDataClient/utils/DataworkerUtils.ts +28 -13
- package/src/clients/BundleDataClient/utils/FillUtils.ts +10 -4
- package/src/clients/BundleDataClient/utils/MerkleTreeUtils.ts +7 -1
- package/src/clients/BundleDataClient/utils/PoolRebalanceUtils.ts +4 -4
- package/src/clients/BundleDataClient/utils/SuperstructUtils.ts +13 -9
- package/src/clients/HubPoolClient.ts +126 -82
- package/src/clients/SpokePoolClient/EVMSpokePoolClient.ts +6 -0
- package/src/clients/SpokePoolClient/SpokePoolClient.ts +118 -35
- package/src/clients/mocks/MockHubPoolClient.ts +24 -19
- package/src/clients/mocks/MockSpokePoolClient.ts +39 -27
- package/src/clients/mocks/MockSvmCpiEventsClient.ts +3 -5
- package/src/clients/mocks/MockSvmSpokePoolClient.ts +12 -3
- package/src/interfaces/HubPool.ts +23 -14
- package/src/interfaces/SpokePool.ts +13 -13
- package/src/relayFeeCalculator/chain-queries/baseQuery.ts +14 -12
- package/src/relayFeeCalculator/chain-queries/svmQuery.ts +42 -46
- package/src/relayFeeCalculator/relayFeeCalculator.ts +20 -12
- package/src/utils/AddressUtils.ts +58 -60
- package/src/utils/EventUtils.ts +2 -2
- package/src/utils/SpokeUtils.ts +11 -33
- package/src/utils/TokenUtils.ts +10 -11
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BigNumber } from "../utils";
|
|
1
|
+
import { Address, BigNumber, EvmAddress } 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: EvmAddress[];
|
|
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: Address;
|
|
18
|
+
refundAddresses: Address[];
|
|
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: EvmAddress;
|
|
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: EvmAddress[];
|
|
51
51
|
proof: string[];
|
|
52
52
|
}
|
|
53
53
|
export type ExecutedRootBundleStringified = Omit<ExecutedRootBundle, "bundleLpFees" | "netSendAmounts" | "runningBalances"> & {
|
|
@@ -61,8 +61,13 @@ export type TokenRunningBalance = {
|
|
|
61
61
|
export interface RelayerRefundLeafWithGroup extends RelayerRefundLeaf {
|
|
62
62
|
groupIndex: number;
|
|
63
63
|
}
|
|
64
|
-
export interface
|
|
65
|
-
address:
|
|
64
|
+
export interface L1TokenInfo {
|
|
65
|
+
address: EvmAddress;
|
|
66
|
+
symbol: string;
|
|
67
|
+
decimals: number;
|
|
68
|
+
}
|
|
69
|
+
export interface TokenInfo {
|
|
70
|
+
address: Address;
|
|
66
71
|
symbol: string;
|
|
67
72
|
decimals: number;
|
|
68
73
|
}
|
|
@@ -72,22 +77,22 @@ export interface LpToken {
|
|
|
72
77
|
}
|
|
73
78
|
export interface CrossChainContractsSet extends SortableEvent {
|
|
74
79
|
l2ChainId: number;
|
|
75
|
-
spokePool:
|
|
80
|
+
spokePool: Address;
|
|
76
81
|
}
|
|
77
82
|
export interface DestinationTokenWithBlock extends SortableEvent {
|
|
78
|
-
l2Token:
|
|
79
|
-
l1Token:
|
|
83
|
+
l2Token: Address;
|
|
84
|
+
l1Token: EvmAddress;
|
|
80
85
|
}
|
|
81
86
|
export interface SetPoolRebalanceRoot extends SortableEvent {
|
|
82
87
|
destinationChainId: number;
|
|
83
|
-
l1Token:
|
|
84
|
-
destinationToken:
|
|
88
|
+
l1Token: EvmAddress;
|
|
89
|
+
destinationToken: Address;
|
|
85
90
|
}
|
|
86
91
|
export interface PendingRootBundle {
|
|
87
92
|
poolRebalanceRoot: string;
|
|
88
93
|
relayerRefundRoot: string;
|
|
89
94
|
slowRelayRoot: string;
|
|
90
|
-
proposer:
|
|
95
|
+
proposer: EvmAddress;
|
|
91
96
|
unclaimedPoolRebalanceLeafCount: number;
|
|
92
97
|
challengePeriodEndTimestamp: number;
|
|
93
98
|
bundleEvaluationBlockNumbers: number[];
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { SortableEvent } from "./Common";
|
|
2
2
|
import { SpokePoolClient } from "../clients";
|
|
3
|
-
import { BigNumber } from "../utils";
|
|
3
|
+
import { BigNumber, Address, EvmAddress } from "../utils";
|
|
4
4
|
import { RelayerRefundLeaf } from "./HubPool";
|
|
5
5
|
export interface RelayData {
|
|
6
6
|
originChainId: number;
|
|
7
|
-
depositor:
|
|
8
|
-
recipient:
|
|
7
|
+
depositor: Address;
|
|
8
|
+
recipient: Address;
|
|
9
9
|
depositId: BigNumber;
|
|
10
|
-
inputToken:
|
|
10
|
+
inputToken: Address;
|
|
11
11
|
inputAmount: BigNumber;
|
|
12
|
-
outputToken:
|
|
12
|
+
outputToken: Address;
|
|
13
13
|
outputAmount: BigNumber;
|
|
14
14
|
message: string;
|
|
15
15
|
fillDeadline: number;
|
|
16
|
-
exclusiveRelayer:
|
|
16
|
+
exclusiveRelayer: Address;
|
|
17
17
|
exclusivityDeadline: number;
|
|
18
18
|
}
|
|
19
19
|
export interface Deposit extends RelayData {
|
|
@@ -21,7 +21,7 @@ export interface Deposit extends RelayData {
|
|
|
21
21
|
destinationChainId: number;
|
|
22
22
|
quoteTimestamp: number;
|
|
23
23
|
speedUpSignature?: string;
|
|
24
|
-
updatedRecipient?:
|
|
24
|
+
updatedRecipient?: Address;
|
|
25
25
|
updatedOutputAmount?: BigNumber;
|
|
26
26
|
updatedMessage?: string;
|
|
27
27
|
fromLiteChain: boolean;
|
|
@@ -44,7 +44,7 @@ export declare enum FillType {
|
|
|
44
44
|
SlowFill = 2
|
|
45
45
|
}
|
|
46
46
|
export interface RelayExecutionEventInfo {
|
|
47
|
-
updatedRecipient:
|
|
47
|
+
updatedRecipient: Address;
|
|
48
48
|
updatedOutputAmount: BigNumber;
|
|
49
49
|
updatedMessage?: string;
|
|
50
50
|
updatedMessageHash: string;
|
|
@@ -53,7 +53,7 @@ export interface RelayExecutionEventInfo {
|
|
|
53
53
|
export interface Fill extends Omit<RelayData, "message"> {
|
|
54
54
|
messageHash: string;
|
|
55
55
|
destinationChainId: number;
|
|
56
|
-
relayer:
|
|
56
|
+
relayer: Address;
|
|
57
57
|
repaymentChainId: number;
|
|
58
58
|
relayExecutionInfo: RelayExecutionEventInfo;
|
|
59
59
|
}
|
|
@@ -63,18 +63,18 @@ export interface FillWithTime extends Fill, SortableEvent {
|
|
|
63
63
|
fillTimestamp: number;
|
|
64
64
|
}
|
|
65
65
|
export interface EnabledDepositRoute {
|
|
66
|
-
originToken:
|
|
66
|
+
originToken: Address;
|
|
67
67
|
destinationChainId: number;
|
|
68
68
|
enabled: boolean;
|
|
69
69
|
}
|
|
70
70
|
export interface EnabledDepositRouteWithBlock extends EnabledDepositRoute, SortableEvent {
|
|
71
71
|
}
|
|
72
72
|
export interface SpeedUp {
|
|
73
|
-
depositor:
|
|
73
|
+
depositor: EvmAddress;
|
|
74
74
|
depositorSignature: string;
|
|
75
75
|
depositId: BigNumber;
|
|
76
76
|
originChainId: number;
|
|
77
|
-
updatedRecipient:
|
|
77
|
+
updatedRecipient: Address;
|
|
78
78
|
updatedOutputAmount: BigNumber;
|
|
79
79
|
updatedMessage: string;
|
|
80
80
|
}
|
|
@@ -115,7 +115,7 @@ export interface TokensBridged extends SortableEvent {
|
|
|
115
115
|
amountToReturn: BigNumber;
|
|
116
116
|
chainId: number;
|
|
117
117
|
leafId: number;
|
|
118
|
-
l2TokenAddress:
|
|
118
|
+
l2TokenAddress: Address;
|
|
119
119
|
}
|
|
120
120
|
export interface ClaimedRelayerRefundWithBlock extends SortableEvent {
|
|
121
121
|
l2TokenAddress: string;
|
|
@@ -2,7 +2,7 @@ import { L2Provider } from "@eth-optimism/sdk/dist/interfaces/l2-provider";
|
|
|
2
2
|
import { PopulatedTransaction, providers } from "ethers";
|
|
3
3
|
import { Deposit } from "../../interfaces";
|
|
4
4
|
import { SpokePool } from "../../typechain";
|
|
5
|
-
import { BigNumberish, TransactionCostEstimate, BigNumber } from "../../utils";
|
|
5
|
+
import { BigNumberish, TransactionCostEstimate, BigNumber, Address } from "../../utils";
|
|
6
6
|
import { Logger, QueryInterface } from "../relayFeeCalculator";
|
|
7
7
|
import { Transport } from "viem";
|
|
8
8
|
import { EvmProvider } from "../../arch/evm/types";
|
|
@@ -46,7 +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(deposit: Omit<Deposit, "messageHash">, relayer?:
|
|
49
|
+
getGasCosts(deposit: Omit<Deposit, "messageHash">, relayer?: Address, options?: Partial<{
|
|
50
50
|
gasPrice: BigNumberish;
|
|
51
51
|
gasUnits: BigNumberish;
|
|
52
52
|
baseFeeMultiplier: BigNumber;
|
|
@@ -60,14 +60,14 @@ export declare class QueryBase implements QueryInterface {
|
|
|
60
60
|
* @param relayer Sender of PopulatedTransaction
|
|
61
61
|
* @returns PopulatedTransaction
|
|
62
62
|
*/
|
|
63
|
-
getUnsignedTxFromDeposit(deposit: Omit<Deposit, "messageHash">, relayer?:
|
|
63
|
+
getUnsignedTxFromDeposit(deposit: Omit<Deposit, "messageHash">, relayer?: Address): Promise<PopulatedTransaction>;
|
|
64
64
|
/**
|
|
65
65
|
* @notice Return the gas cost of a simulated transaction
|
|
66
66
|
* @param deposit
|
|
67
67
|
* @param relayer Sender of PopulatedTransaction
|
|
68
68
|
* @returns Estimated gas cost based on ethers.VoidSigner's gas estimation
|
|
69
69
|
*/
|
|
70
|
-
getNativeGasCost(deposit: Omit<Deposit, "messageHash">, relayer?:
|
|
70
|
+
getNativeGasCost(deposit: Omit<Deposit, "messageHash">, relayer?: Address): Promise<BigNumber>;
|
|
71
71
|
/**
|
|
72
72
|
* @notice Return L1 data fee for OP stack L2 transaction, which is based on L2 calldata.
|
|
73
73
|
* @dev https://docs.optimism.io/stack/transactions/fees#l1-data-fee
|
|
@@ -76,7 +76,7 @@ export declare class QueryBase implements QueryInterface {
|
|
|
76
76
|
* @param options Specify gas units to avoid additional gas estimation call and multiplier for L1 data fee
|
|
77
77
|
* @returns BigNumber L1 data fee in gas units
|
|
78
78
|
*/
|
|
79
|
-
getOpStackL1DataFee(unsignedTx: PopulatedTransaction, relayer:
|
|
79
|
+
getOpStackL1DataFee(unsignedTx: PopulatedTransaction, relayer: Address | undefined, options: Partial<{
|
|
80
80
|
opStackL2GasUnits: BigNumberish;
|
|
81
81
|
opStackL1DataFeeMultiplier: BigNumber;
|
|
82
82
|
}>): Promise<BigNumber>;
|
|
@@ -91,7 +91,7 @@ export declare class QueryBase implements QueryInterface {
|
|
|
91
91
|
* @param options.transport A custom transport object for custom gas price retrieval.
|
|
92
92
|
* @returns Estimated cost in units of gas and the underlying gas token (gasPrice * estimatedGasUnits).
|
|
93
93
|
*/
|
|
94
|
-
estimateGas(unsignedTx: PopulatedTransaction, senderAddress:
|
|
94
|
+
estimateGas(unsignedTx: PopulatedTransaction, senderAddress: Address, provider: providers.Provider | L2Provider<providers.Provider>, options?: Partial<{
|
|
95
95
|
gasPrice: BigNumberish;
|
|
96
96
|
gasUnits: BigNumberish;
|
|
97
97
|
baseFeeMultiplier: BigNumber;
|
|
@@ -5,7 +5,7 @@ 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, } from "../../utils";
|
|
8
|
+
import { BigNumber, toBNWei, bnZero, chainIsOPStack, fixedPointAdjustment, toAddressType, } from "../../utils";
|
|
9
9
|
import assert from "assert";
|
|
10
10
|
import { getDefaultSimulatedRelayerAddress } from "../relayFeeCalculator";
|
|
11
11
|
import { getGasPriceEstimate } from "../../gasPriceOracle";
|
|
@@ -48,7 +48,7 @@ var QueryBase = /** @class */ (function () {
|
|
|
48
48
|
* @returns The gas estimate for this function call (multiplied with the optional buffer).
|
|
49
49
|
*/
|
|
50
50
|
QueryBase.prototype.getGasCosts = function (deposit, relayer, options) {
|
|
51
|
-
if (relayer === void 0) { relayer = getDefaultSimulatedRelayerAddress(deposit.destinationChainId); }
|
|
51
|
+
if (relayer === void 0) { relayer = toAddressType(getDefaultSimulatedRelayerAddress(deposit.destinationChainId), deposit.destinationChainId); }
|
|
52
52
|
if (options === void 0) { options = {}; }
|
|
53
53
|
return __awaiter(this, void 0, void 0, function () {
|
|
54
54
|
var _a, gasPrice, gasUnits, baseFeeMultiplier, priorityFeeMultiplier, opStackL1GasCostMultiplier, transport, tx, _b, nativeGasCost, tokenGasCost, impliedGasPrice, opStackL1GasCost;
|
|
@@ -86,7 +86,7 @@ var QueryBase = /** @class */ (function () {
|
|
|
86
86
|
* @returns PopulatedTransaction
|
|
87
87
|
*/
|
|
88
88
|
QueryBase.prototype.getUnsignedTxFromDeposit = function (deposit, relayer) {
|
|
89
|
-
if (relayer === void 0) { relayer = getDefaultSimulatedRelayerAddress(deposit.destinationChainId); }
|
|
89
|
+
if (relayer === void 0) { relayer = toAddressType(getDefaultSimulatedRelayerAddress(deposit.destinationChainId), deposit.destinationChainId); }
|
|
90
90
|
return populateV3Relay(this.spokePool, deposit, relayer);
|
|
91
91
|
};
|
|
92
92
|
/**
|
|
@@ -96,7 +96,7 @@ var QueryBase = /** @class */ (function () {
|
|
|
96
96
|
* @returns Estimated gas cost based on ethers.VoidSigner's gas estimation
|
|
97
97
|
*/
|
|
98
98
|
QueryBase.prototype.getNativeGasCost = function (deposit, relayer) {
|
|
99
|
-
if (relayer === void 0) { relayer = getDefaultSimulatedRelayerAddress(deposit.destinationChainId); }
|
|
99
|
+
if (relayer === void 0) { relayer = toAddressType(getDefaultSimulatedRelayerAddress(deposit.destinationChainId), deposit.destinationChainId); }
|
|
100
100
|
return __awaiter(this, void 0, void 0, function () {
|
|
101
101
|
var unsignedTx, voidSigner;
|
|
102
102
|
return __generator(this, function (_a) {
|
|
@@ -104,7 +104,7 @@ var QueryBase = /** @class */ (function () {
|
|
|
104
104
|
case 0: return [4 /*yield*/, this.getUnsignedTxFromDeposit(deposit, relayer)];
|
|
105
105
|
case 1:
|
|
106
106
|
unsignedTx = _a.sent();
|
|
107
|
-
voidSigner = new VoidSigner(relayer, this.provider);
|
|
107
|
+
voidSigner = new VoidSigner(relayer.toEvmAddress(), this.provider);
|
|
108
108
|
return [2 /*return*/, voidSigner.estimateGas(unsignedTx)];
|
|
109
109
|
}
|
|
110
110
|
});
|
|
@@ -119,7 +119,7 @@ var QueryBase = /** @class */ (function () {
|
|
|
119
119
|
* @returns BigNumber L1 data fee in gas units
|
|
120
120
|
*/
|
|
121
121
|
QueryBase.prototype.getOpStackL1DataFee = function (unsignedTx, relayer, options) {
|
|
122
|
-
if (relayer === void 0) { relayer = getDefaultSimulatedRelayerAddress(unsignedTx.chainId); }
|
|
122
|
+
if (relayer === void 0) { relayer = toAddressType(getDefaultSimulatedRelayerAddress(unsignedTx.chainId), CHAIN_IDs.MAINNET); }
|
|
123
123
|
return __awaiter(this, void 0, void 0, function () {
|
|
124
124
|
var _a, opStackL2GasUnits, _b, opStackL1DataFeeMultiplier, chainId, voidSigner, populatedTransaction, l1DataFee;
|
|
125
125
|
return __generator(this, function (_c) {
|
|
@@ -130,7 +130,7 @@ var QueryBase = /** @class */ (function () {
|
|
|
130
130
|
case 1:
|
|
131
131
|
chainId = (_c.sent()).chainId;
|
|
132
132
|
assert(isOptimismL2Provider(this.provider), "Unexpected provider for chain ID ".concat(chainId, "."));
|
|
133
|
-
voidSigner = new VoidSigner(relayer, this.provider);
|
|
133
|
+
voidSigner = new VoidSigner(relayer.toEvmAddress(), this.provider);
|
|
134
134
|
return [4 /*yield*/, voidSigner.populateTransaction(__assign(__assign({}, unsignedTx), { gasLimit: opStackL2GasUnits }))];
|
|
135
135
|
case 2:
|
|
136
136
|
populatedTransaction = _c.sent();
|
|
@@ -156,7 +156,7 @@ var QueryBase = /** @class */ (function () {
|
|
|
156
156
|
QueryBase.prototype.estimateGas = function (unsignedTx, senderAddress, provider, options) {
|
|
157
157
|
if (options === void 0) { options = {}; }
|
|
158
158
|
return __awaiter(this, void 0, void 0, function () {
|
|
159
|
-
var _a, _gasPrice, gasUnits, _b, baseFeeMultiplier, _c, priorityFeeMultiplier, _d, opStackL1GasCostMultiplier, transport, chainId, voidSigner, queries, _e, nativeGasCost,
|
|
159
|
+
var _a, _gasPrice, gasUnits, _b, baseFeeMultiplier, _c, priorityFeeMultiplier, _d, opStackL1GasCostMultiplier, transport, chainId, voidSigner, queries, _e, nativeGasCost, gasPriceEstimate, gasPrice, tokenGasCost, opStackL1GasCost, l2GasCost;
|
|
160
160
|
return __generator(this, function (_f) {
|
|
161
161
|
switch (_f.label) {
|
|
162
162
|
case 0:
|
|
@@ -164,7 +164,7 @@ var QueryBase = /** @class */ (function () {
|
|
|
164
164
|
return [4 /*yield*/, provider.getNetwork()];
|
|
165
165
|
case 1:
|
|
166
166
|
chainId = (_f.sent()).chainId;
|
|
167
|
-
voidSigner = new VoidSigner(senderAddress, provider);
|
|
167
|
+
voidSigner = new VoidSigner(senderAddress.toEvmAddress(), provider);
|
|
168
168
|
queries = [
|
|
169
169
|
gasUnits ? Promise.resolve(BigNumber.from(gasUnits)) : voidSigner.estimateGas(unsignedTx),
|
|
170
170
|
_gasPrice
|
|
@@ -173,8 +173,8 @@ var QueryBase = /** @class */ (function () {
|
|
|
173
173
|
];
|
|
174
174
|
return [4 /*yield*/, Promise.all(queries)];
|
|
175
175
|
case 2:
|
|
176
|
-
_e = _f.sent(), nativeGasCost = _e[0],
|
|
177
|
-
gasPrice =
|
|
176
|
+
_e = _f.sent(), nativeGasCost = _e[0], gasPriceEstimate = _e[1];
|
|
177
|
+
gasPrice = gasPriceEstimate.maxFeePerGas;
|
|
178
178
|
assert(nativeGasCost.gt(bnZero), "Gas cost should not be 0");
|
|
179
179
|
if (!chainIsOPStack(chainId)) return [3 /*break*/, 4];
|
|
180
180
|
return [4 /*yield*/, this.getOpStackL1DataFee(unsignedTx, senderAddress, {
|
|
@@ -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;AAE1F,OAAO,EAAmC,UAAU,EAAE,MAAM,QAAQ,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAa,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAGL,SAAS,EACT,OAAO,EACP,MAAM,EACN,cAAc,EACd,oBAAoB,
|
|
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;AAE1F,OAAO,EAAmC,UAAU,EAAE,MAAM,QAAQ,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM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ryInterface {
|
|
11
11
|
readonly provider: SVMProvider;
|
|
12
12
|
readonly symbolMapping: SymbolMappingType;
|
|
13
|
-
readonly
|
|
13
|
+
readonly spokePool: SvmAddress;
|
|
14
14
|
readonly simulatedRelayerAddress: SvmAddress;
|
|
15
15
|
readonly logger: Logger;
|
|
16
16
|
readonly coingeckoProApiKey?: string | undefined;
|
|
@@ -27,14 +27,14 @@ export declare class SvmQuery implements QueryInterface {
|
|
|
27
27
|
* Instantiates a SvmQuery instance
|
|
28
28
|
* @param provider A valid solana/kit rpc client.
|
|
29
29
|
* @param symbolMapping A mapping to valid ERC20 tokens and their respective characteristics
|
|
30
|
-
* @param
|
|
30
|
+
* @param spokePool The valid address of the Spoke Pool deployment
|
|
31
31
|
* @param simulatedRelayerAddress The address that these queries will reference as the sender. Note: This address must be approved for USDC
|
|
32
32
|
* @param logger A logging utility to report logs
|
|
33
33
|
* @param coingeckoProApiKey An optional CoinGecko API key that links to a PRO account
|
|
34
34
|
* @param fixedGasPrice Overrides the gas price with a fixed value. Note: primarily used for the Boba blockchain
|
|
35
35
|
* @param coingeckoBaseCurrency The basis currency that CoinGecko will use to resolve pricing
|
|
36
36
|
*/
|
|
37
|
-
constructor(provider: SVMProvider, symbolMapping: SymbolMappingType,
|
|
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
40
|
* @param deposit V3 deposit instance.
|
|
@@ -45,7 +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(deposit: Omit<Deposit, "messageHash">,
|
|
48
|
+
getGasCosts(deposit: Omit<Deposit, "messageHash">, relayer?: import("../../utils").Address, options?: Partial<{
|
|
49
49
|
gasPrice: BigNumberish;
|
|
50
50
|
gasUnits: BigNumberish;
|
|
51
51
|
baseFeeMultiplier: BigNumber;
|
|
@@ -57,14 +57,14 @@ export declare class SvmQuery implements QueryInterface {
|
|
|
57
57
|
* @param relayer SVM address of the relayer
|
|
58
58
|
* @returns Estimated gas cost in compute units
|
|
59
59
|
*/
|
|
60
|
-
getNativeGasCost(deposit: Omit<Deposit, "messageHash">, _relayer?:
|
|
60
|
+
getNativeGasCost(deposit: Omit<Deposit, "messageHash">, _relayer?: import("../../utils").Address): Promise<BigNumber>;
|
|
61
61
|
/**
|
|
62
62
|
* @notice Return the fillRelay transaction for a given deposit
|
|
63
63
|
* @param deposit
|
|
64
64
|
* @param relayer SVM address of the relayer
|
|
65
65
|
* @returns FillRelay transaction
|
|
66
66
|
*/
|
|
67
|
-
getFillRelayTx(deposit: Omit<Deposit, "messageHash">,
|
|
67
|
+
getFillRelayTx(deposit: Omit<Deposit, "messageHash">, 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<{
|
|
68
68
|
instructions: readonly import("@solana/kit").IInstruction<string, readonly (import("@solana/kit").IAccountLookupMeta<string, string> | import("@solana/kit").IAccountMeta<string>)[]>[];
|
|
69
69
|
version: 0;
|
|
70
70
|
}>, "feePayer">>;
|
|
@@ -3,7 +3,7 @@ import { intToU8Array32 } from "@across-protocol/contracts/dist/src/svm/web3-v1/
|
|
|
3
3
|
import { SYSTEM_PROGRAM_ADDRESS } from "@solana-program/system";
|
|
4
4
|
import { ASSOCIATED_TOKEN_PROGRAM_ADDRESS, fetchMint } from "@solana-program/token";
|
|
5
5
|
import { getComputeUnitEstimateForTransactionMessageFactory } from "@solana/kit";
|
|
6
|
-
import { SolanaVoidSigner,
|
|
6
|
+
import { SolanaVoidSigner, createFillInstruction, getAssociatedTokenAddress, getEventAuthority, getFillRelayDelegatePda, getFillStatusPda, getStatePda, toAddress, } from "../../arch/svm";
|
|
7
7
|
import { Coingecko } from "../../coingecko";
|
|
8
8
|
import { CHAIN_IDs } from "../../constants";
|
|
9
9
|
import { getGasPriceEstimate } from "../../gasPriceOracle";
|
|
@@ -18,18 +18,18 @@ var SvmQuery = /** @class */ (function () {
|
|
|
18
18
|
* Instantiates a SvmQuery instance
|
|
19
19
|
* @param provider A valid solana/kit rpc client.
|
|
20
20
|
* @param symbolMapping A mapping to valid ERC20 tokens and their respective characteristics
|
|
21
|
-
* @param
|
|
21
|
+
* @param spokePool The valid address of the Spoke Pool deployment
|
|
22
22
|
* @param simulatedRelayerAddress The address that these queries will reference as the sender. Note: This address must be approved for USDC
|
|
23
23
|
* @param logger A logging utility to report logs
|
|
24
24
|
* @param coingeckoProApiKey An optional CoinGecko API key that links to a PRO account
|
|
25
25
|
* @param fixedGasPrice Overrides the gas price with a fixed value. Note: primarily used for the Boba blockchain
|
|
26
26
|
* @param coingeckoBaseCurrency The basis currency that CoinGecko will use to resolve pricing
|
|
27
27
|
*/
|
|
28
|
-
function SvmQuery(provider, symbolMapping,
|
|
28
|
+
function SvmQuery(provider, symbolMapping, spokePool, simulatedRelayerAddress, logger, coingeckoProApiKey, fixedGasPrice, coingeckoBaseCurrency) {
|
|
29
29
|
if (coingeckoBaseCurrency === void 0) { coingeckoBaseCurrency = "eth"; }
|
|
30
30
|
this.provider = provider;
|
|
31
31
|
this.symbolMapping = symbolMapping;
|
|
32
|
-
this.
|
|
32
|
+
this.spokePool = spokePool;
|
|
33
33
|
this.simulatedRelayerAddress = simulatedRelayerAddress;
|
|
34
34
|
this.logger = logger;
|
|
35
35
|
this.coingeckoProApiKey = coingeckoProApiKey;
|
|
@@ -49,16 +49,14 @@ var SvmQuery = /** @class */ (function () {
|
|
|
49
49
|
* @param options.transport Optional transport object for custom gas price retrieval.
|
|
50
50
|
* @returns The gas estimate for this function call (multiplied with the optional buffer).
|
|
51
51
|
*/
|
|
52
|
-
SvmQuery.prototype.getGasCosts = function (deposit,
|
|
53
|
-
if (
|
|
52
|
+
SvmQuery.prototype.getGasCosts = function (deposit, relayer, options) {
|
|
53
|
+
if (relayer === void 0) { relayer = toAddressType(getDefaultSimulatedRelayerAddress(deposit.destinationChainId), deposit.destinationChainId); }
|
|
54
54
|
if (options === void 0) { options = {}; }
|
|
55
55
|
return __awaiter(this, void 0, void 0, function () {
|
|
56
|
-
var
|
|
56
|
+
var fillRelayTx, _a, computeUnitsConsumed, gasPriceEstimate, _b, _c, _d, gasPrice;
|
|
57
57
|
return __generator(this, function (_e) {
|
|
58
58
|
switch (_e.label) {
|
|
59
|
-
case 0:
|
|
60
|
-
relayer = _relayer ? toAddressType(_relayer).forceSvmAddress() : this.simulatedRelayerAddress;
|
|
61
|
-
return [4 /*yield*/, this.getFillRelayTx(deposit, relayer.toBase58())];
|
|
59
|
+
case 0: return [4 /*yield*/, this.getFillRelayTx(deposit, relayer)];
|
|
62
60
|
case 1:
|
|
63
61
|
fillRelayTx = _e.sent();
|
|
64
62
|
_c = (_b = Promise).all;
|
|
@@ -73,8 +71,7 @@ var SvmQuery = /** @class */ (function () {
|
|
|
73
71
|
})
|
|
74
72
|
]])];
|
|
75
73
|
case 3:
|
|
76
|
-
_a = _e.sent(), computeUnitsConsumed = _a[0],
|
|
77
|
-
gasPriceEstimate = _gasPriceEstimate;
|
|
74
|
+
_a = _e.sent(), computeUnitsConsumed = _a[0], gasPriceEstimate = _a[1];
|
|
78
75
|
gasPrice = gasPriceEstimate.baseFee.add(gasPriceEstimate.microLamportsPerComputeUnit.mul(computeUnitsConsumed).div(toBN(1000000)) // 1_000_000 microLamports/lamport.
|
|
79
76
|
);
|
|
80
77
|
return [2 /*return*/, {
|
|
@@ -93,7 +90,7 @@ var SvmQuery = /** @class */ (function () {
|
|
|
93
90
|
* @returns Estimated gas cost in compute units
|
|
94
91
|
*/
|
|
95
92
|
SvmQuery.prototype.getNativeGasCost = function (deposit, _relayer) {
|
|
96
|
-
if (_relayer === void 0) { _relayer = getDefaultSimulatedRelayerAddress(deposit.destinationChainId); }
|
|
93
|
+
if (_relayer === void 0) { _relayer = toAddressType(getDefaultSimulatedRelayerAddress(deposit.destinationChainId), deposit.destinationChainId); }
|
|
97
94
|
return __awaiter(this, void 0, void 0, function () {
|
|
98
95
|
var fillRelayTx, _a;
|
|
99
96
|
return __generator(this, function (_b) {
|
|
@@ -114,48 +111,44 @@ var SvmQuery = /** @class */ (function () {
|
|
|
114
111
|
* @param relayer SVM address of the relayer
|
|
115
112
|
* @returns FillRelay transaction
|
|
116
113
|
*/
|
|
117
|
-
SvmQuery.prototype.getFillRelayTx = function (deposit,
|
|
118
|
-
if (
|
|
114
|
+
SvmQuery.prototype.getFillRelayTx = function (deposit, relayer, repaymentChainId, repaymentAddress) {
|
|
115
|
+
if (relayer === void 0) { relayer = toAddressType(getDefaultSimulatedRelayerAddress(deposit.destinationChainId), deposit.destinationChainId); }
|
|
119
116
|
if (repaymentChainId === void 0) { repaymentChainId = deposit.destinationChainId; }
|
|
120
|
-
if (repaymentAddress === void 0) { repaymentAddress = getDefaultSimulatedRelayerAddress(deposit.destinationChainId); }
|
|
117
|
+
if (repaymentAddress === void 0) { repaymentAddress = toAddressType(getDefaultSimulatedRelayerAddress(deposit.destinationChainId), deposit.destinationChainId); }
|
|
121
118
|
return __awaiter(this, void 0, void 0, function () {
|
|
122
|
-
var
|
|
123
|
-
return __generator(this, function (
|
|
124
|
-
switch (
|
|
119
|
+
var depositor, recipient, inputToken, outputToken, exclusiveRelayer, destinationChainId, program, _relayDataHash, relayDataHash, _a, state, delegate, mint, mintInfo, _b, recipientAta, relayerAta, fillStatus, eventAuthority, relayData, simulatedSigner, fillInput;
|
|
120
|
+
return __generator(this, function (_c) {
|
|
121
|
+
switch (_c.label) {
|
|
125
122
|
case 0:
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
case 1:
|
|
130
|
-
state = _a.sent();
|
|
131
|
-
_relayDataHash = getRelayDataHash(deposit, deposit.destinationChainId);
|
|
123
|
+
depositor = deposit.depositor, recipient = deposit.recipient, inputToken = deposit.inputToken, outputToken = deposit.outputToken, exclusiveRelayer = deposit.exclusiveRelayer, destinationChainId = deposit.destinationChainId;
|
|
124
|
+
program = toAddress(this.spokePool);
|
|
125
|
+
_relayDataHash = getRelayDataHash(deposit, destinationChainId);
|
|
132
126
|
relayDataHash = new Uint8Array(Buffer.from(_relayDataHash.slice(2), "hex"));
|
|
133
|
-
return [4 /*yield*/,
|
|
127
|
+
return [4 /*yield*/, Promise.all([
|
|
128
|
+
getStatePda(program),
|
|
129
|
+
getFillRelayDelegatePda(relayDataHash, BigInt(repaymentChainId), toAddress(repaymentAddress), program),
|
|
130
|
+
])];
|
|
131
|
+
case 1:
|
|
132
|
+
_a = _c.sent(), state = _a[0], delegate = _a[1];
|
|
133
|
+
mint = toAddress(outputToken);
|
|
134
|
+
return [4 /*yield*/, fetchMint(this.provider, mint)];
|
|
134
135
|
case 2:
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
mintInfo = _c.sent();
|
|
137
|
+
return [4 /*yield*/, Promise.all([
|
|
138
|
+
getAssociatedTokenAddress(deposit.recipient, outputToken, mintInfo.programAddress),
|
|
139
|
+
getAssociatedTokenAddress(SvmAddress.from(relayer.toBase58()), outputToken, mintInfo.programAddress),
|
|
140
|
+
getFillStatusPda(program, deposit, destinationChainId),
|
|
141
|
+
getEventAuthority(program),
|
|
142
|
+
])];
|
|
138
143
|
case 3:
|
|
139
|
-
|
|
140
|
-
return [4 /*yield*/, getAssociatedTokenAddress(toAddressType(deposit.recipient).forceSvmAddress(), mint, mintInfo.programAddress)];
|
|
141
|
-
case 4:
|
|
142
|
-
recipientAta = _a.sent();
|
|
143
|
-
return [4 /*yield*/, getAssociatedTokenAddress(SvmAddress.from(relayer.toBase58()), mint, mintInfo.programAddress)];
|
|
144
|
-
case 5:
|
|
145
|
-
relayerAta = _a.sent();
|
|
146
|
-
return [4 /*yield*/, getFillStatusPda(this.spokePoolAddress.toV2Address(), deposit, deposit.destinationChainId)];
|
|
147
|
-
case 6:
|
|
148
|
-
fillStatus = _a.sent();
|
|
149
|
-
return [4 /*yield*/, getEventAuthority()];
|
|
150
|
-
case 7:
|
|
151
|
-
eventAuthority = _a.sent();
|
|
144
|
+
_b = _c.sent(), recipientAta = _b[0], relayerAta = _b[1], fillStatus = _b[2], eventAuthority = _b[3];
|
|
152
145
|
relayData = {
|
|
153
|
-
depositor:
|
|
154
|
-
recipient:
|
|
155
|
-
exclusiveRelayer:
|
|
156
|
-
inputToken:
|
|
157
|
-
outputToken: mint
|
|
158
|
-
inputAmount:
|
|
146
|
+
depositor: toAddress(depositor),
|
|
147
|
+
recipient: toAddress(recipient),
|
|
148
|
+
exclusiveRelayer: toAddress(exclusiveRelayer),
|
|
149
|
+
inputToken: toAddress(inputToken),
|
|
150
|
+
outputToken: mint,
|
|
151
|
+
inputAmount: deposit.inputAmount.toBigInt(),
|
|
159
152
|
outputAmount: deposit.outputAmount.toBigInt(),
|
|
160
153
|
originChainId: deposit.originChainId,
|
|
161
154
|
depositId: new Uint8Array(intToU8Array32(deposit.depositId.toNumber())),
|
|
@@ -168,7 +161,7 @@ var SvmQuery = /** @class */ (function () {
|
|
|
168
161
|
signer: simulatedSigner,
|
|
169
162
|
state: state,
|
|
170
163
|
delegate: delegate,
|
|
171
|
-
mint: mint
|
|
164
|
+
mint: mint,
|
|
172
165
|
relayerTokenAccount: relayerAta,
|
|
173
166
|
recipientTokenAccount: recipientAta,
|
|
174
167
|
fillStatus: fillStatus,
|
|
@@ -176,11 +169,11 @@ var SvmQuery = /** @class */ (function () {
|
|
|
176
169
|
associatedTokenProgram: ASSOCIATED_TOKEN_PROGRAM_ADDRESS,
|
|
177
170
|
systemProgram: SYSTEM_PROGRAM_ADDRESS,
|
|
178
171
|
eventAuthority: eventAuthority,
|
|
179
|
-
program:
|
|
172
|
+
program: program,
|
|
180
173
|
relayHash: relayDataHash,
|
|
181
174
|
relayData: relayData,
|
|
182
175
|
repaymentChainId: BigInt(repaymentChainId),
|
|
183
|
-
repaymentAddress:
|
|
176
|
+
repaymentAddress: toAddress(repaymentAddress),
|
|
184
177
|
};
|
|
185
178
|
// Pass createRecipientAtaIfNeeded =true to the createFillInstruction function to create the recipient token account
|
|
186
179
|
// if it doesn't exist.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"svmQuery.js","sourceRoot":"","sources":["../../../../src/relayFeeCalculator/chain-queries/svmQuery.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,MAAM,iEAAiE,CAAC;AACjG,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,gCAAgC,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACpF,OAAO,EAAE,kDAAkD,EAAE,MAAM,aAAa,CAAC;AACjF,OAAO,EAEL,gBAAgB,EAChB,
|
|
1
|
+
{"version":3,"file":"svmQuery.js","sourceRoot":"","sources":["../../../../src/relayFeeCalculator/chain-queries/svmQuery.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,MAAM,iEAAiE,CAAC;AACjG,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,gCAAgC,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACpF,OAAO,EAAE,kDAAkD,EAAE,MAAM,aAAa,CAAC;AACjF,OAAO,EAEL,gBAAgB,EAChB,qBAAqB,EACrB,yBAAyB,EACzB,iBAAiB,EACjB,uBAAuB,EACvB,gBAAgB,EAChB,WAAW,EACX,SAAS,GACV,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC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