Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ developer-preview: decode transaction calldata #104

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

cruzdanilo
Copy link

changes

  • receive hex calldata as input for preview values
  • fetch url-based abis, handle special cases: non-raw github, etherscan api (requires key through env var NEXT_PUBLIC_ETHERSCAN_API_KEY, fails gracefully without it)
  • decode calldata based on abi, fallback to format signature when human-readable
  • format timestamps, units and token amounts
  • resolve ens names (reverse lookup)
  • add viem dependency, and a polyfill for TextEncoder (only for jest tests)
  • closes add tx simulation #78
Screenshot 2024-12-01 at 13 38 14

@jnicoulaud-ledger jnicoulaud-ledger added the preview-tool Changes to developer-preview tool label Dec 2, 2024
@cruzdanilo cruzdanilo force-pushed the calldata branch 2 times, most recently from dfe2c68 to aaf576d Compare December 3, 2024 06:43
@LL782
Copy link
Collaborator

LL782 commented Dec 19, 2024

@cruzdanilo thank you very much for your PR and apologies that I missed the notification before now. After a first read of the description and a first scan of the code changes this looks like excellent work. @pdeville-ledger and/or myself will try to give it a full review this week.

Firstly, I'd like to share some context around the preview tool. This locally run web-app is very likely to be replaced and removed from this repository. We just started work on a hosted web-app that will generate the Clear-Signing JSON file, starting with a contract address or ABI and providing UI for adding the Clear-signing meta-data. The preview will be live in the browser and the end result will be a JSON file to add to this repository (the registry). So while some of the functionality will be the same as this preview tool we want to be transparent that the preview tool will probably be removed from this repository and much of the code will be replaced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview-tool Changes to developer-preview tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add tx simulation
4 participants