Consensys / linea-attestation-registry

Verax is a shared registry for storing attestations of public interest on EVM chains, designed to enhance data discoverability and consumption for dApps across the network.
https://ver.ax
MIT License
129 stars 65 forks source link

[TASK] Make the "error handler" give more information #769

Open alainncls opened 2 days ago

alainncls commented 2 days ago

Currently, the errorHandler can only throw contextualized errors when their signature matches with the ABIs contained in the SDK.

  1. In the case where the error is of type ContractFunctionRevertedError, but doesn't have an "errorName", use its signature.
  2. In the case where the error is not of type ContractFunctionRevertedError, use its "shortMessage".
  3. In the fallback case, change the generic message to ${type} failed.
Chirag-S-Kotian commented 1 day ago

please assign this task to me

Chirag-S-Kotian commented 1 day ago

hey @alainncls how to run the development server in pnpm here ,i already installed pnpm i and i dont know why i cant push the code forked repo

alainncls commented 1 day ago

Hey @Chirag-S-Kotian 👋

So, you should start by installing all the dependencies: pnpm i Then you can develop on the errorHandler file and add more unit test in the corresponding test file.

Once your implementation gives you satisfaction and you have a good set of tests to cover it, you can then open a PR on this repo, from your forked repo. You can check GitHub's documentation to do so 😃

Chirag-S-Kotian commented 1 day ago

I already fixed that error handling and I don't know how to run the server in pnpm ,i actually use npm, don't know why I can't push the code to my forked repo it is saying something about prettier lint something problem 😔.

Can you help me with that??

alainncls commented 1 day ago

Ah yes, I see. When you installed the dependencies, it also installed a pre-commit hook with husky. It runs a few commands while committing your changes. Those commands are defined here.

And you can't use npm on this repo, it's based on pnpm solely.

What you need to check, is the linting and formatting of the code you've added/modified, it must follow the rules defined for the repo.

Chirag-S-Kotian commented 1 day ago

I already checked linting and prettier through pnpm ,there is no problem in terminal ,then it gives something git error problem 😕

alainncls commented 1 day ago

You can ignore the checks while committing: https://graphite.dev/guides/git-commit-skip-hooks#how-to-skip-git-commit-hooks We'll see via the CI if there really is an issue with the code then.

Chirag-S-Kotian commented 1 day ago

here i forked this repo from dev branch https://github.com/Consensys/linea-attestation-registry.git and my repo is https://github.com/Chirag-S-Kotian/linea-attestation-registry.git it is also in dev branch i cant push the code to my forked repo could you please help me to resolve this error image

alainncls commented 1 day ago

here i forked this repo from dev branch https://github.com/Consensys/linea-attestation-registry.git and my repo is https://github.com/Chirag-S-Kotian/linea-attestation-registry.git it is also in dev branch i cant push the code to my forked repo could you please help me to resolve this error

Is see that you managed to open a PR #777 , that's great! 👍 Let me check it out!

By the way, you can reach out to us on Discord if that's easier for you 🙂