@@ -296,31 +296,18 @@ export class EvmPricePusher implements IPricePusher {
296296 [ priceFeedUpdateData , priceIdsWith0x , pubTimesToPushParam ] ,
297297 {
298298 value : updateFee ,
299- gasPrice : BigInt ( Math . round ( gasPrice ) ) ,
299+ gasPrice : BigInt ( Math . ceil ( gasPrice ) ) ,
300300 nonce : txNonce ,
301301 gas :
302302 this . gasLimit !== undefined
303- ? BigInt ( Math . round ( this . gasLimit ) )
303+ ? BigInt ( Math . ceil ( this . gasLimit ) )
304304 : undefined ,
305305 }
306306 ) ;
307307
308308 this . logger . debug ( { request } , "Simulated request successfully" ) ;
309309
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 ) ;
324311
325312 this . logger . info ( { hash } , "Price update sent" ) ;
326313
@@ -345,10 +332,10 @@ export class EvmPricePusher implements IPricePusher {
345332 if ( err . walk ( ( e ) => e instanceof InsufficientFundsError ) ) {
346333 this . logger . error (
347334 { 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 " +
349336 "calculation in the RPC."
350337 ) ;
351- throw new Error ( "Please top up the wallet" ) ;
338+ throw err ;
352339 }
353340
354341 if (
@@ -457,6 +444,7 @@ export class EvmPricePusher implements IPricePusher {
457444
458445 switch ( receipt . status ) {
459446 case "success" :
447+ this . logger . debug ( { hash, receipt } , "Price update successful" ) ;
460448 this . logger . info ( { hash } , "Price update successful" ) ;
461449 break ;
462450 default :
0 commit comments