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

Update to make it possible to Build Proposals for Core Contracts not registered yet #543

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aaronmgdr
Copy link
Member

@aaronmgdr aaronmgdr commented Mar 13, 2025

Description

Other changes

make output of json in error cleaner

Tested

anvil

How to QA

in cli directory after building

anvil --fork-url https://forno.celo.org --auto-impersonate
NO_SYNCCHECK=1 yarn dev governance:propose --deposit 10000e18 --jsonTransactions prop.json --from 0xc11F5aC70B86517Dcc10f20d8B0D5e77EBb956Ce --descriptionURL https://github.com/celo-org/governance/blob/main/CGPs/cgp-0167.md -n http://127.0.0.1:8545 --afterExecutingID=215 --force

Related issues

  • Fixes #[issue number here]

PR-Codex overview

This PR focuses on improving error handling and logging in the proposals.ts and proposal-builder.ts files within the governance SDK. It enhances the error message formatting and adds additional logging for building calls to core contracts.

Detailed summary

  • In proposals.ts, the error message when parsing a transaction is updated to include pretty-printed JSON.
  • In proposal-builder.ts, the logic for determining the address is modified to include more concise handling of potential values.
  • An additional logging statement is added to indicate when a call to the core contract is being built.
  • A temporary check is introduced to set the registry addition if it’s not already present.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

changeset-bot bot commented Mar 13, 2025

⚠️ No Changeset found

Latest commit: dca6b2c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

codecov bot commented Mar 13, 2025

Codecov Report

Attention: Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.

Project coverage is 76.82%. Comparing base (55f1e99) to head (dca6b2c).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #543   +/-   ##
=======================================
  Coverage   76.82%   76.82%           
=======================================
  Files         248      248           
  Lines       10674    10677    +3     
  Branches     1691     1700    +9     
=======================================
+ Hits         8200     8203    +3     
- Misses       2384     2402   +18     
+ Partials       90       72   -18     
Components Coverage Δ
celocli 86.73% <ø> (ø)
sdk 69.48% <71.42%> (+0.01%) ⬆️
wallets 74.03% <ø> (ø)
viem-sdks 93.54% <ø> (ø)
🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aaronmgdr
Copy link
Member Author

TODO: figure out if there is any downside in merging this as is or if we need to make any adjustments. because while it worked for the intended use case that use case was not the usual way. although it seems pretty reasonable.

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

Successfully merging this pull request may close these issues.

2 participants