Are there any functionalities available on web3.js to provide the details Etheresacn provides, such as Txn Type, the Base fee per gas, etc.

I am aware of web3.eth.getTransactionReceipt however, it is missing the above attributes.

Here is an example to transaction details on Etherscan (https://etherscan.io/tx/0xfadaad55279b536b18225aec6f485034ab157fefed65b98da14f22954b00c303)


I just connected to Infura node using web3.py and here is output of the following command:


{'accessList': [], 
'blockHash': HexBytes('0x26ddf1189d0f8473b6640e1113beed5934e5e621ea994e5bf37d4255dee8a9da'), 
'blockNumber': 13124873, 
'chainId': '0x1', 
'from': '0x5A0b54D5dc17e0AadC383d2db43B0a0D3E029c4c', 
'gas': 100000, 
'gasPrice': 98943318241, 
'hash': HexBytes('0x847dc489014532d6c8805a9c90260ce67994adedca3598e6ba9e6839d4d472be'), 
'input': '0x', 'maxFeePerGas': '0x559b9368f4', 'maxPriorityFeePerGas': '0x0', 
'nonce': 6061436, 
'r': HexBytes('0xa374a0cb796071ba58db3bbb7f923cd5ae4eda77068269f67fa6c9b1de28e6f3'), 
's': HexBytes('0xf834d3e491609efcb4a43169adc765335370de4d273ce55a7d113dc686e955'), 
'to': '0x8fD00f170FDf3772C5ebdCD90bF257316c69BA45', 
'transactionIndex': 43, 
'type': '0x2', 
'v': 0, 
'value': 98012341188637423626})

Some details can be computered using the above command.


There is no way to get those information directly. But you can use bytecode as a hint. Here is a link for you to understanding deeply.

  • Wonder how etherscan retrieves those details Aug 30 at 3:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.