You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gasPrice exists in the returning type of web3.eth.getTransaction()
Actual behavior
The error:
Property 'gasPrice' does not exist on type '{ readonly yParity: string; readonly r: string; readonly s: string; readonly maxFeePerGas: string; readonly maxPriorityFeePerGas: string; readonly accessList: { readonly address?: string | undefined; readonly storageKeys?: string[] | undefined; }[]; ... 12 more ...; readonly transactionIndex?: string | undefined; } ...'.
Property 'gasPrice' does not exist on type '{ readonly yParity: string; readonly r: string; readonly s: string; readonly maxFeePerGas: string; readonly maxPriorityFeePerGas: string; readonly accessList: { readonly address?: string | undefined; readonly storageKeys?: string[] | undefined; }[]; ... 12 more ...; readonly transactionIndex?: string | undefined; }'.
const gasPrice = BigInt(transactionDetails.gasPrice);
Steps to reproduce the behavior
Try to build code:
consttest=async()=>{constweb3=newWeb3();consttransactionDetails=awaitweb3.eth.getTransaction('0x');// here it will throw error that gasPrice is not a property of transactionconstgasPrice=BigInt(transactionDetails.gasPrice);console.log(gasPrice);};test().catch();
Logs
Environment
The text was updated successfully, but these errors were encountered:
gasPrice
doesn't exist inweb3.eth.getTransaction()
return typeoriginal link
Expected behavior
gasPrice
exists in the returning type ofweb3.eth.getTransaction()
Actual behavior
The error:
Steps to reproduce the behavior
Try to build code:
Logs
Environment
The text was updated successfully, but these errors were encountered: