File tree 2 files changed +7
-3
lines changed
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -184,8 +184,11 @@ export namespace NTT {
184
184
const program = getNttProgram ( connection , programId . toString ( ) , "1.0.0" ) ;
185
185
186
186
const ix = await program . methods . version ( ) . accountsStrict ( { } ) . instruction ( ) ;
187
- const { blockhash } =
188
- await program . provider . connection . getLatestBlockhash ( ) ;
187
+ // Since we don't need the very very very latest blockhash, using finalized
188
+ // ensures the blockhash will be found when we immediately simulate the tx
189
+ const { blockhash } = await program . provider . connection . getLatestBlockhash (
190
+ "finalized"
191
+ ) ;
189
192
const msg = new TransactionMessage ( {
190
193
payerKey : sender ,
191
194
recentBlockhash : blockhash ,
Original file line number Diff line number Diff line change 5
5
AddressLookupTableAccount ,
6
6
Connection ,
7
7
Keypair ,
8
+ LAMPORTS_PER_SOL ,
8
9
PublicKey ,
9
10
SystemProgram ,
10
11
Transaction ,
@@ -391,7 +392,7 @@ export class SolanaNtt<N extends Network, C extends SolanaChains>
391
392
payerAddress ,
392
393
outboxItem . publicKey ,
393
394
destination . chain ,
394
- Number ( fee ) ,
395
+ Number ( fee ) / LAMPORTS_PER_SOL ,
395
396
// Note: quoter expects gas dropoff to be in terms of gwei
396
397
Number ( options . gasDropoff ?? 0n ) / WEI_PER_GWEI
397
398
) ;
You can’t perform that action at this time.
0 commit comments