@across-protocol/sdk 4.3.106-alpha.0 → 4.3.106
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/svm/SpokeUtils.d.ts +38 -11
- package/dist/cjs/arch/svm/SpokeUtils.js.map +1 -1
- package/dist/cjs/arch/svm/eventsClient.js +3 -5
- package/dist/cjs/arch/svm/eventsClient.js.map +1 -1
- package/dist/cjs/arch/svm/utils.d.ts +3 -5
- package/dist/cjs/clients/BundleDataClient/utils/FillUtils.js +4 -1
- package/dist/cjs/clients/BundleDataClient/utils/FillUtils.js.map +1 -1
- package/dist/cjs/clients/mocks/MockSvmCpiEventsClient.d.ts +1 -1
- package/dist/cjs/clients/mocks/MockSvmCpiEventsClient.js.map +1 -1
- package/dist/cjs/clients/mocks/MockSvmSpokePoolClient.d.ts +1 -1
- package/dist/cjs/clients/mocks/MockSvmSpokePoolClient.js.map +1 -1
- package/dist/cjs/constants.js +0 -3
- package/dist/cjs/constants.js.map +1 -1
- package/dist/cjs/gasPriceOracle/oracle.js +0 -1
- package/dist/cjs/gasPriceOracle/oracle.js.map +1 -1
- package/dist/cjs/relayFeeCalculator/chain-queries/svmQuery.d.ts +6 -3
- package/dist/cjs/relayFeeCalculator/chain-queries/svmQuery.js.map +1 -1
- package/dist/cjs/utils/Multicall.js +1 -2
- package/dist/cjs/utils/Multicall.js.map +1 -1
- package/dist/esm/arch/svm/SpokeUtils.d.ts +38 -11
- 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 -5
- package/dist/esm/clients/BundleDataClient/utils/FillUtils.js +5 -2
- package/dist/esm/clients/BundleDataClient/utils/FillUtils.js.map +1 -1
- package/dist/esm/clients/mocks/MockSvmCpiEventsClient.d.ts +1 -1
- package/dist/esm/clients/mocks/MockSvmCpiEventsClient.js.map +1 -1
- package/dist/esm/clients/mocks/MockSvmSpokePoolClient.d.ts +1 -1
- package/dist/esm/clients/mocks/MockSvmSpokePoolClient.js.map +1 -1
- package/dist/esm/constants.js +0 -3
- package/dist/esm/constants.js.map +1 -1
- package/dist/esm/gasPriceOracle/oracle.js +0 -1
- package/dist/esm/gasPriceOracle/oracle.js.map +1 -1
- package/dist/esm/relayFeeCalculator/chain-queries/svmQuery.d.ts +6 -3
- package/dist/esm/relayFeeCalculator/chain-queries/svmQuery.js.map +1 -1
- package/dist/esm/utils/Multicall.js +1 -2
- package/dist/esm/utils/Multicall.js.map +1 -1
- package/dist/types/arch/svm/SpokeUtils.d.ts +38 -11
- 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 -5
- package/dist/types/arch/svm/utils.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 +1 -1
- package/dist/types/clients/mocks/MockSvmSpokePoolClient.d.ts.map +1 -1
- package/dist/types/constants.d.ts.map +1 -1
- package/dist/types/gasPriceOracle/oracle.d.ts.map +1 -1
- package/dist/types/relayFeeCalculator/chain-queries/svmQuery.d.ts +6 -3
- package/dist/types/relayFeeCalculator/chain-queries/svmQuery.d.ts.map +1 -1
- package/dist/types/utils/Multicall.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/arch/svm/SpokeUtils.ts +10 -12
- package/src/arch/svm/eventsClient.ts +3 -5
- package/src/clients/BundleDataClient/utils/FillUtils.ts +5 -2
- package/src/clients/mocks/MockSvmCpiEventsClient.ts +1 -1
- package/src/clients/mocks/MockSvmSpokePoolClient.ts +1 -1
- package/src/constants.ts +0 -3
- package/src/gasPriceOracle/oracle.ts +0 -1
- package/src/relayFeeCalculator/chain-queries/svmQuery.ts +1 -3
- package/src/utils/Multicall.ts +0 -1
|
@@ -125,7 +125,7 @@ export class SvmCpiEventsClient {
|
|
|
125
125
|
const addressToQuery = derivedAddress || this.programAddress;
|
|
126
126
|
const allSignatures: GetSignaturesForAddressTransaction[] = [];
|
|
127
127
|
let hasMoreSignatures = true;
|
|
128
|
-
let currentOptions =
|
|
128
|
+
let currentOptions = options;
|
|
129
129
|
|
|
130
130
|
while (hasMoreSignatures) {
|
|
131
131
|
const signatures: GetSignaturesForAddressApiResponse = await this.rpc
|
|
@@ -179,7 +179,7 @@ export class SvmCpiEventsClient {
|
|
|
179
179
|
*/
|
|
180
180
|
async readEventsFromSignature(txSignature: Signature, commitment: Commitment = "confirmed") {
|
|
181
181
|
const txResult = await this.rpc
|
|
182
|
-
.getTransaction(txSignature, { commitment, maxSupportedTransactionVersion: 0
|
|
182
|
+
.getTransaction(txSignature, { commitment, maxSupportedTransactionVersion: 0 })
|
|
183
183
|
.send();
|
|
184
184
|
|
|
185
185
|
return this.processEventFromTx(txResult);
|
|
@@ -245,7 +245,6 @@ export class SvmCpiEventsClient {
|
|
|
245
245
|
.getTransaction(txSignature, {
|
|
246
246
|
commitment,
|
|
247
247
|
maxSupportedTransactionVersion: 0,
|
|
248
|
-
encoding: "json",
|
|
249
248
|
})
|
|
250
249
|
.send(),
|
|
251
250
|
]);
|
|
@@ -256,7 +255,7 @@ export class SvmCpiEventsClient {
|
|
|
256
255
|
return;
|
|
257
256
|
}
|
|
258
257
|
|
|
259
|
-
return
|
|
258
|
+
return depositEvents.map((event) => {
|
|
260
259
|
const unwrappedEventArgs = unwrapEventData(event as Record<string, unknown>, [
|
|
261
260
|
"depositId",
|
|
262
261
|
"outputAmount",
|
|
@@ -312,7 +311,6 @@ export class SvmCpiEventsClient {
|
|
|
312
311
|
.getTransaction(txSignature, {
|
|
313
312
|
commitment,
|
|
314
313
|
maxSupportedTransactionVersion: 0,
|
|
315
|
-
encoding: "json",
|
|
316
314
|
})
|
|
317
315
|
.send(),
|
|
318
316
|
]);
|
|
@@ -161,9 +161,12 @@ function _getRepaymentChainId(
|
|
|
161
161
|
return relayData.destinationChainId;
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
// Repayment chain is valid if the input token and repayment chain are mapped to the same PoolRebalanceRoute.
|
|
164
|
+
// Repayment chain is valid if the input token and repayment chain are mapped to the same PoolRebalanceRoute and the repayment chain is not disabled in protocol.
|
|
165
165
|
const repaymentTokenIsValid = _repaymentChainTokenIsValid(relayData, hubPoolClient, bundleEndBlockForMainnet);
|
|
166
|
-
|
|
166
|
+
const repaymentChainIsValid = !hubPoolClient.configStoreClient
|
|
167
|
+
.getDisabledChainsForBlock(bundleEndBlockForMainnet)
|
|
168
|
+
.includes(relayData.repaymentChainId);
|
|
169
|
+
if (repaymentTokenIsValid && repaymentChainIsValid) {
|
|
167
170
|
return relayData.repaymentChainId;
|
|
168
171
|
}
|
|
169
172
|
|
|
@@ -31,7 +31,7 @@ export class MockSvmCpiEventsClient extends SvmCpiEventsClient {
|
|
|
31
31
|
public minBlockRange = 10;
|
|
32
32
|
public numberOfDeposits = bnZero;
|
|
33
33
|
|
|
34
|
-
constructor(programId
|
|
34
|
+
constructor(programId = SvmSpokeClient.SVM_SPOKE_PROGRAM_ADDRESS, chainId = CHAIN_IDs.SOLANA) {
|
|
35
35
|
super(null as unknown as SVMProvider, programId as Address, null as unknown as Address, null as unknown as Idl);
|
|
36
36
|
this.chainId = chainId;
|
|
37
37
|
}
|
|
@@ -27,7 +27,7 @@ export class MockSvmSpokePoolClient extends SVMSpokePoolClient {
|
|
|
27
27
|
constructor(
|
|
28
28
|
logger: winston.Logger,
|
|
29
29
|
chainId: number,
|
|
30
|
-
programId
|
|
30
|
+
programId = SvmSpokeClient.SVM_SPOKE_PROGRAM_ADDRESS,
|
|
31
31
|
deploymentBlock: number = 1,
|
|
32
32
|
eventSearchConfig: MakeOptional<EventSearchConfig, "to"> = { from: 0, maxLookBack: 0 },
|
|
33
33
|
opts: { hubPoolClient: HubPoolClient | null } = { hubPoolClient: null }
|
package/src/constants.ts
CHANGED
|
@@ -80,9 +80,6 @@ export const STABLE_COIN_SYMBOLS = [
|
|
|
80
80
|
TOKEN_SYMBOLS_MAP["USDT-BNB"].symbol,
|
|
81
81
|
TOKEN_SYMBOLS_MAP["USDT-SPOT"].symbol,
|
|
82
82
|
TOKEN_SYMBOLS_MAP.DAI.symbol,
|
|
83
|
-
TOKEN_SYMBOLS_MAP["TATARA-USDC"].symbol,
|
|
84
|
-
TOKEN_SYMBOLS_MAP["TATARA-USDT"].symbol,
|
|
85
|
-
TOKEN_SYMBOLS_MAP["TATARA-USDS"].symbol,
|
|
86
83
|
TOKEN_SYMBOLS_MAP.GHO.symbol,
|
|
87
84
|
TOKEN_SYMBOLS_MAP.WGHO.symbol,
|
|
88
85
|
];
|
|
@@ -118,7 +118,6 @@ function _getEthersGasPriceEstimate(
|
|
|
118
118
|
[CHAIN_IDs.ARBITRUM_SEPOLIA]: arbitrum.eip1559,
|
|
119
119
|
[CHAIN_IDs.POLYGON_AMOY]: polygon.gasStation,
|
|
120
120
|
[CHAIN_IDs.SEPOLIA]: ethereum.eip1559,
|
|
121
|
-
[CHAIN_IDs.TATARA]: ethereum.eip1559,
|
|
122
121
|
} as const;
|
|
123
122
|
|
|
124
123
|
let gasPriceFeed = gasPriceFeeds[chainId];
|
|
@@ -4,8 +4,6 @@ import {
|
|
|
4
4
|
TransactionSigner,
|
|
5
5
|
fetchEncodedAccount,
|
|
6
6
|
isSome,
|
|
7
|
-
type CompilableTransactionMessage,
|
|
8
|
-
type TransactionMessageWithBlockhashLifetime,
|
|
9
7
|
} from "@solana/kit";
|
|
10
8
|
import { SVMProvider, SolanaVoidSigner, getFillRelayTx, toAddress, getAssociatedTokenAddress } from "../../arch/svm";
|
|
11
9
|
import { Coingecko } from "../../coingecko";
|
|
@@ -185,7 +183,7 @@ export class SvmQuery implements QueryInterface {
|
|
|
185
183
|
signer: TransactionSigner,
|
|
186
184
|
repaymentChainId: number,
|
|
187
185
|
repaymentAddress: Address
|
|
188
|
-
)
|
|
186
|
+
) {
|
|
189
187
|
return await getFillRelayTx(this.spokePool, this.provider, relayData, signer, repaymentChainId, repaymentAddress);
|
|
190
188
|
}
|
|
191
189
|
|
package/src/utils/Multicall.ts
CHANGED