wevm / viem

TypeScript Interface for Ethereum
https://viem.sh
Other
2.44k stars 729 forks source link

Add docs for `formatTransaction` #2558

Closed Yuripetusko closed 1 month ago

Yuripetusko commented 1 month ago

What is the type of issue?

Documentation is missing

What is the issue?

While this is a minor util, and there are a lot of undocumented utils like this. This is a follow up to a Discord question a user had on parsing rpc response where values are Hex. And I had to look through the code to find this util, as viem docs doesn't feature it

image

Where did you find it?

Here's a useful code that I found when looking for an util that fits a requirement as per Discord question https://github.com/wevm/viem/blob/6949c2b009c70bf7057bec56c0da28e9ada13fe3/src/utils/formatters/transaction.test.ts#L7

And here's a proof that it can't be found on the viem docs

image