1
+ import { CHAIN_IDs } from "@across-protocol/constants" ;
1
2
import { SvmSpokeClient } from "@across-protocol/contracts" ;
2
3
import { getSolanaChainId , intToU8Array32 , u8Array32ToInt } from "@across-protocol/contracts/dist/src/svm/web3-v1" ;
3
4
import { SYSTEM_PROGRAM_ADDRESS } from "@solana-program/system" ;
4
5
import { ASSOCIATED_TOKEN_PROGRAM_ADDRESS , TOKEN_2022_PROGRAM_ADDRESS } from "@solana-program/token-2022" ;
5
- import { address , Address , KeyPairSigner } from "@solana/kit" ;
6
+ import { Address , KeyPairSigner , address } from "@solana/kit" ;
6
7
import { expect } from "chai" ;
7
8
import { BigNumber } from "ethers" ;
8
9
import { arrayify , hexlify } from "ethers/lib/utils" ;
@@ -28,8 +29,6 @@ import {
28
29
mintTokens ,
29
30
requestSlowFill ,
30
31
} from "./utils/svm/utils" ;
31
- import { validatorSetup , validatorTeardown } from "./utils/svm/validator.setup" ;
32
- import { CHAIN_IDs } from "@across-protocol/constants" ;
33
32
34
33
// Define an extended interface for our Solana client with chainId
35
34
interface ExtendedSolanaClient extends ReturnType < typeof createDefaultSolanaClient > {
@@ -213,9 +212,6 @@ describe("SvmCpiEventsClient (integration)", () => {
213
212
} ;
214
213
215
214
before ( async function ( ) {
216
- /* Local validator spin‑up can take a few seconds */
217
- this . timeout ( 60_000 ) ;
218
- await validatorSetup ( ) ;
219
215
signer = await generateKeyPairSignerWithSol ( solanaClient ) ;
220
216
( { state } = await initializeSvmSpoke ( signer , solanaClient , signer . address ) ) ;
221
217
( { mint, decimals } = await createMint ( signer , solanaClient ) ) ;
@@ -224,10 +220,6 @@ describe("SvmCpiEventsClient (integration)", () => {
224
220
eventAuthority = await getEventAuthority ( ) ;
225
221
} ) ;
226
222
227
- after ( async ( ) => {
228
- await validatorTeardown ( ) ;
229
- } ) ;
230
-
231
223
it ( "fetches all events" , async ( ) => {
232
224
const payerAta = await mintTokens ( signer , solanaClient , mint . address , tokenAmount * 2n + 1n ) ;
233
225
await sendCreateDeposit ( payerAta , tokenAmount , tokenAmount ) ;
@@ -377,7 +369,7 @@ describe("SvmCpiEventsClient (integration)", () => {
377
369
expect ( fillEvent . inputAmount . toString ( ) ) . to . equal ( BigInt ( relayData . inputAmount ) . toString ( ) ) ;
378
370
expect ( fillEvent . outputAmount . toString ( ) ) . to . equal ( BigInt ( relayData . outputAmount ) . toString ( ) ) ;
379
371
expect ( fillEvent . originChainId ) . to . equal ( Number ( relayData . originChainId ) ) ;
380
- expect ( fillEvent . depositId ) . to . equal ( u8Array32ToInt ( relayData . depositId ) ) ;
372
+ expect ( fillEvent . depositId ) . to . equal ( u8Array32ToInt ( Array . from ( relayData . depositId ) ) ) ;
381
373
expect ( fillEvent . fillDeadline ) . to . equal ( Number ( relayData . fillDeadline ) ) ;
382
374
expect ( fillEvent . exclusivityDeadline ) . to . equal ( Number ( relayData . exclusivityDeadline ) ) ;
383
375
} ) ;
0 commit comments