@@ -296,31 +296,18 @@ export class EvmPricePusher implements IPricePusher {
296
296
[ priceFeedUpdateData , priceIdsWith0x , pubTimesToPushParam ] ,
297
297
{
298
298
value : updateFee ,
299
- gasPrice : BigInt ( Math . round ( gasPrice ) ) ,
299
+ gasPrice : BigInt ( Math . ceil ( gasPrice ) ) ,
300
300
nonce : txNonce ,
301
301
gas :
302
302
this . gasLimit !== undefined
303
- ? BigInt ( Math . round ( this . gasLimit ) )
303
+ ? BigInt ( Math . ceil ( this . gasLimit ) )
304
304
: undefined ,
305
305
}
306
306
) ;
307
307
308
308
this . logger . debug ( { request } , "Simulated request successfully" ) ;
309
309
310
- const hash = await this . pythContract . write . updatePriceFeedsIfNecessary (
311
- [ priceFeedUpdateData , priceIdsWith0x , pubTimesToPushParam ] ,
312
- {
313
- value : updateFee ,
314
- gasPrice : BigInt ( Math . round ( gasPrice ) ) ,
315
- nonce : txNonce ,
316
- gas :
317
- this . gasLimit !== undefined
318
- ? BigInt ( Math . round ( this . gasLimit ) )
319
- : undefined ,
320
- chain : this . client . chain ,
321
- account : this . client . account ! ,
322
- }
323
- ) ;
310
+ const hash = await this . client . writeContract ( request ) ;
324
311
325
312
this . logger . info ( { hash } , "Price update sent" ) ;
326
313
@@ -345,10 +332,10 @@ export class EvmPricePusher implements IPricePusher {
345
332
if ( err . walk ( ( e ) => e instanceof InsufficientFundsError ) ) {
346
333
this . logger . error (
347
334
{ err } ,
348
- "Wallet doesn't have enough balance. In a rare case , there might be issues with gas price " +
335
+ "Wallet doesn't have enough balance. In rare cases , there might be issues with gas price " +
349
336
"calculation in the RPC."
350
337
) ;
351
- throw new Error ( "Please top up the wallet" ) ;
338
+ throw err ;
352
339
}
353
340
354
341
if (
@@ -457,6 +444,7 @@ export class EvmPricePusher implements IPricePusher {
457
444
458
445
switch ( receipt . status ) {
459
446
case "success" :
447
+ this . logger . debug ( { hash, receipt } , "Price update successful" ) ;
460
448
this . logger . info ( { hash } , "Price update successful" ) ;
461
449
break ;
462
450
default :
0 commit comments