Content
@
https://warpcast.com/~/channel/base-seoul
0 reply
0 recast
0 reaction
Alex Kim
@alexkimr
#DailyChallenge Day 19 Continuing playing with APIs. Today I wrote code that provides total transaction cost on Base network and converts wei to eth so that it'd be more readable. For Base Mainnet connection, I used Infura HTTP RPC URL. So, the bullet list of today's code: - Connecting to Base Mainnet using the Infura HTTP RPC URL. - Fetcheing the current gas price from Base Mainnet. - Estimateing gas usage for a 0.001 ETH transaction between two addresses. - Calculating total transaction cost by multiplying gas_price * gas_estimate - Converting the total fee from Wei to ETH for easier readability.
0 reply
0 recast
3 reactions