@@ -145,6 +145,7 @@ export class AcrossClient {
145145 private walletClient ?: ConfiguredWalletClient ;
146146 private apiUrl : string ;
147147 private indexerUrl : string ;
148+
148149 logger : LoggerT ;
149150
150151 // Tenderly related options
@@ -251,7 +252,7 @@ export class AcrossClient {
251252 acrossChains . map ( ( acrossChain ) => [ acrossChain . chainId , acrossChain ] ) ,
252253 ) ;
253254 }
254- if ( this . chainInfo . has ( chainId ) ) {
255+ if ( ! this . chainInfo . has ( chainId ) ) {
255256 throw new Error ( `Could not find chainInfo for chain with id ${ chainId } ` ) ;
256257 }
257258
@@ -566,11 +567,32 @@ export class AcrossClient {
566567 async getDeposit (
567568 params : Omit <
568569 GetDepositParams ,
569- "originChainClient" | "destinationChainClient" | "indexerUrl"
570- > ,
570+ "originChainClient" | "destinationChainClient" | "indexerUrl" | "findBy"
571+ > & {
572+ findBy : {
573+ originSpokePoolAddress ?: Address ;
574+ destinationSpokePoolAddress ?: Address ;
575+ originChainId : number ;
576+ destinationChainId : number ;
577+ depositId ?: number ;
578+ depositTxHash ?: Hex ;
579+ } ;
580+ } ,
571581 ) {
582+ const originSpokePoolAddress =
583+ params . findBy . originSpokePoolAddress ??
584+ ( await this . getSpokePoolAddress ( params . findBy . originChainId ) ) ;
585+ const destinationSpokePoolAddress =
586+ params . findBy . destinationSpokePoolAddress ??
587+ ( await this . getSpokePoolAddress ( params . findBy . destinationChainId ) ) ;
588+
572589 return getDeposit ( {
573590 ...params ,
591+ findBy : {
592+ ...params . findBy ,
593+ originSpokePoolAddress,
594+ destinationSpokePoolAddress,
595+ } ,
574596 indexerUrl : this . indexerUrl ,
575597 originChainClient : this . getPublicClient ( params . findBy . originChainId ) ,
576598 destinationChainClient : this . getPublicClient (
0 commit comments