Skip to content

fix(governance): proxy-repoint log + show proposal id in governance:propose#782

Merged
pahor167 merged 18 commits into
masterfrom
pahor/fix-propose-proxy-log-and-proposalid
Jun 16, 2026
Merged

fix(governance): proxy-repoint log + show proposal id in governance:propose#782
pahor167 merged 18 commits into
masterfrom
pahor/fix-propose-proxy-log-and-proposalid

Conversation

@pahor167

@pahor167 pahor167 commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Two governance:propose output bugs reported on celocli 9.0.0:

  1. undefined is a proxy, repointing to ...ProposalBuilder.fromJsonTx logged tx.address, which is undefined for core-contract proxy repoints that identify the target by contract (the map key already fell back to tx.contract). Now logs the real proxy id (address || contract).
  2. Proposal id missing from output — after submitting, governance:propose printed only the tx hash. It now decodes the ProposalQueued event via displayViemTx, so the new proposal id is shown.

Test plan

  • @celo/governance build + tests (42/42)
  • @celo/celocli build + governance:propose test (14/14)
  • CI green

🤖 Generated with Claude Code


PR-Codex overview

This PR focuses on enhancing governance commands and utilities, improving proposal handling, and refining event logging. It introduces new checks, updates to proposal execution, and better handling of slashing penalties in rewards.

Detailed summary

  • Added proposalIsApproved check in governance/execute.ts.
  • Introduced --slashing flag in rewards/show.ts for slashing penalties.
  • Improved logging in tests to confirm successful checks and actions.
  • Updated error messages for deprecated flags in authorize.test.ts.
  • Enhanced proposal handling in governance/propose.ts with new simulation options.
  • Refined event decoding and logging in several governance commands.
  • Fixed proposal filtering logic to ensure only groups with pending votes are considered.
  • Improved handling of pending withdrawals in lockedcelo/withdraw.ts.
  • Added system anvil binary resolution for test harness compatibility.

The following files were skipped due to too many changes: packages/cli/src/utils/cli.ts

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

…d in governance:propose

- proposal-builder: log the proxy identifier (address || contract) instead of
  always tx.address, which was undefined for core-contract repoints
  ('undefined is a proxy, repointing to ...').
- celocli governance:propose: decode the ProposalQueued event via displayViemTx
  so the created proposal id is printed after submitting.
@pahor167 pahor167 requested a review from a team as a code owner June 16, 2026 08:00
@changeset-bot

changeset-bot Bot commented Jun 16, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9a33726

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@celo/governance Patch
@celo/actions Patch
@celo/dev-utils Patch
@celo/explorer Patch
@celo/celocli Patch

Not sure what this means? Click here to learn what changesets are.

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 640c960128

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/cli/src/commands/governance/propose.ts
@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
require('@celo/actions') (cjs) 98.85 KB (0%)
import * from '@celo/actions' (esm) 23.55 KB (0%)
import { resolveAddress } from '@celo/actions' (esm) 23.49 KB (0%)
import { getGasPriceOnCelo } from '@celo/actions' (esm) 73 B (0%)
import { getAccountsContract } from '@celo/actions/contracts/accounts' (esm) 46.11 KB (0%)
import * from '@celo/actions/staking' (esm) 50.66 KB (0%)

@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 46.57534% with 39 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.85%. Comparing base (e2641eb) to head (9a33726).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #782      +/-   ##
==========================================
- Coverage   68.34%   66.85%   -1.50%     
==========================================
  Files         152      169      +17     
  Lines        8824     9808     +984     
  Branches     1663     1809     +146     
==========================================
+ Hits         6031     6557     +526     
- Misses       2721     3158     +437     
- Partials       72       93      +21     
Components Coverage Δ
celocli 49.27% <5.26%> (∅)
sdk 67.34% <90.90%> (+0.11%) ⬆️
wallets 73.68% <ø> (ø)
viem-sdks 94.15% <ø> (ø)
🚀 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.

…face event ids

- governance:execute: add proposalIsApproved precondition check (was reverting
  on-chain with 'Proposal not approved' after passing all displayed checks).
- lockedcelo:withdraw + releasecelo:locked-gold: fix infinite loop when no
  withdrawal is available; re-fetch pending list between withdrawals.
- surface on-chain event ids via displayViemTx for governance:propose
  (ProposalQueued + multisig Submission), upvote (ProposalUpvoted),
  revokeupvote (ProposalUpvoteRevoked), votePartially (ProposalVoted/V2),
  multisig:approve (Confirmation).
- tests: execute approval-failure regression + updated success snapshot;
  lockedcelo:withdraw no-hang regression.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 23250b0c15

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/cli/src/commands/governance/propose.ts Outdated
Pavel Hornak added 2 commits June 16, 2026 10:47
- validators precheck: meetsValidator(Group)BalanceRequirements compared the
  requirement DURATION (index [1]) against locked gold instead of the VALUE
  (index [0]); register pre-check passed for almost any locked amount, then
  reverted on-chain with 'Insufficient locked gold'.
- election: getGroupsWithPendingVotes filtered with pendingVotes[i] >= 0 (a
  uint256 is always >= 0, so it never filtered); use > 0n.
- account:authorize: --blsKey/--blsPop were undeclared so the 'BLS not
  supported' guard was dead and oclif rejected them with a generic error;
  declare them hidden+deprecated so the guard returns the clear message.
- account:set-wallet: signature was parsed twice (first in a swallowed
  try/catch, second unguarded) → unhandled throw on a bad signature; parse
  once and fail cleanly.
- account:set-payment-delegation/delete-payment-delegation/deauthorize: add the
  isAccount precondition the on-chain calls require (was 'all checks passed'
  then revert).
- validatorgroup:commission: re-enable the signerAccountIsValidatorGroup check
  (was commented out, letting non-owners pass checks then revert).
- releasecelo:locked-gold: drop a stray debug console.log.
- tests: update authorize BLS + deauthorize snapshots for the above.
res.flags.slashing was read but never declared, so the slashing
penalties/rewards output was dead code and '--slashing' was rejected by oclif
as an unknown flag. Declare it as a boolean flag.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 75ab333368

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/cli/src/commands/governance/propose.ts
…log fixes

- validators.test: regression for meetsValidator(Group)BalanceRequirements
  comparing the requirement value (not duration) against locked gold.
- proposal-builder.test: fromJsonTx logs the proxy identifier (contract) and
  never 'undefined' for core-contract repoints.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 04441a4945

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .changeset/fix-propose-proxy-log-and-proposalid.md
Pavel Hornak and others added 4 commits June 16, 2026 11:10
Extend the successful Core-contract propose test to assert the command output
includes the decoded ProposalQueued event and 'proposalId: 1', covering the
proposal-id surfacing fix.
… flag

- election.test.ts: getGroupsWithPendingVotes must keep only groups with
  pending votes > 0 (regression for the old >= 0 filter).
- rewards/show.test.ts: --slashing must parse cleanly (was an undeclared flag)
  and surface the slashing section.
governance:propose only decoded ProposalQueued on the direct-wallet branch. On
the supported multisig and safe submit paths the underlying governance.propose
executes in the same receipt when the threshold is met, but the command printed
only the tx hash, leaving the proposal id missing.

- multisig branch now decodes Submission (submit), Confirmation (later signer)
  and ProposalQueued (inline execute) via a combined abi.
- extract decodeAndPrintEvents helper from displayViemTx; reuse it in
  displaySafeTx so safe receipts (ethers-shaped logs) surface events too.
- performSafeTransaction forwards decode opts; propose's --useSafe path passes
  governance ProposalQueued.
- add @celo/actions patch to the changeset so the election getGroupsWithPendingVotes
  fix actually ships (celocli pins the exact @celo/actions version).
- propose.test asserts the 1-signer multisig path prints Submission +
  ProposalQueued + proposalId.
…sal-builder

buildCallToCoreContract encoded against the bundled (static) @celo/abis ABI, so
a core-contract method added by an earlier upgrade tx in the SAME proposal
(proxy repoint -> new impl) failed to build with 'Method X not found in ABI'.
Now, when a method is missing from the bundled ABI, resolve it from the
implementation a prior tx repointed the proxy to (tracked in
externalCallProxyRepoint, verified-metadata lookup), with a raw signature
fallback (function: "name(uint256)"). Adds tests for both fallbacks.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9c4f7754c3

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/sdk/governance/src/proposal-builder.ts
Pavel Hornak and others added 5 commits June 16, 2026 12:10
Bundle @foundry-rs/anvil (per-platform prebuilt binary, no foundry install
required) and simulate proposals by default against a local fork of the
connected node, applying transactions sequentially so dependent txs (e.g. a
method added by a prior upgrade tx) validate correctly. Flags: --simulate <url>
for an external fork, --no-simulate for the legacy per-tx eth_call checks.

Bundling anvil creates a node_modules/.bin/anvil shim that yarn puts ahead of
the foundry install on PATH, which broke the @celo/dev-utils anvil test harness
(the devchain state snapshot only parses with the CI-pinned foundry anvil). Fix
the harness to resolve the foundry anvil ($HOME/.foundry/bin, with a PATH scan
that skips package-manager bin shims) instead of whatever 'anvil' is first on
PATH. Honors CELO_TEST_ANVIL_BINARY override.
Add a block-explorer ABI strategy (and proxy variant) to BlockExplorer so
proposalToJSON can decode calls whose ABI is not on Sourcify. The proxy
variant honors proxyImplementationOverride, so a proxy upgraded earlier in
the same proposal resolves to its new implementation's verified ABI. This
fixes decoding governance proposals that upgrade a proxy and then call a new
method on it, and survives the Sourcify v1 API sunset.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
withAnvilFork called createAnvil without a port, so @viem/anvil defaulted to
8545 and did not retry on bind failure: a locally-running node/anvil on 8545
broke 'governance:propose' simulation. Acquire a free ephemeral port instead.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
externalCallProxyRepoint is keyed by the proxy contract name (e.g.
ValidatorsProxy) while core-contract txs reference the bare name (Validators),
so the repoint lookup missed and the upgraded-method ABI never resolved. Match
on the proxy-stripped name or the resolved proxy address instead.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 159b299c41

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .changeset/fix-propose-proxy-log-and-proposalid.md

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ab8cd46361

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/sdk/governance/src/proposal-builder.ts
The Sourcify v1 repo API (repo.sourcify.dev) has been sunset and returns 503,
so fetchMetadata always failed -> contract ABI resolution broke (e.g.
governance:propose could not build calls to verified impls). Switch to the v2
contract endpoint (?fields=metadata), which returns the same solc metadata
shape so the Metadata wrapper is unchanged. Map v2 'exact_match'/'match' to the
former full/partial semantics (strict = exact only). Tests updated to v2.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 38aecf034b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +316 to +317
this.getContractMappingFromExplorer,
this.getContractMappingFromExplorerAsProxy,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Guard Sourcify failures before explorer fallback

When Sourcify is unavailable at the transport level (for example DNS/TLS/timeout so fetchMetadata rejects instead of returning a non-2xx response), the new Blockscout fallback still cannot be used: these strategies are run through the Promise.all just below, so any rejection from getContractMappingFromSourcify/AsProxy rejects the whole lookup even if getContractMappingFromExplorer would have found the ABI. Wrap each strategy call or the Sourcify strategies so fallback sources can return a mapping after a Sourcify request error.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9a33726189

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

'RPC URL of a forked node (e.g. anvil) to simulate the proposal against. Each proposal transaction is actually sent (not eth_call) from the Governance contract address, which the node must have unlocked (e.g. anvil --auto-impersonate). Overrides the default bundled-anvil fork simulation. Useful for proposals where the success of one tx depends on a previous one succeeding.',
exclusive: ['force', 'noSimulate'],
}),
noSimulate: Flags.boolean({

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Register the documented --no-simulate flag

Oclif uses the flag object key as the long flag name (its help label defaults to --<name>), so this registers --noSimulate, while the changeset tells users to opt out with --no-simulate. In the cases where the new default anvil fork cannot be used and users follow the release note, the command rejects the documented escape hatch as an unknown flag instead of falling back to the legacy eth_call checks; rename this key to no-simulate or add a kebab-case alias.

Useful? React with 👍 / 👎.

@pahor167 pahor167 merged commit 9d19100 into master Jun 16, 2026
27 of 42 checks passed
@pahor167 pahor167 deleted the pahor/fix-propose-proxy-log-and-proposalid branch June 16, 2026 13:57
@github-actions github-actions Bot mentioned this pull request Jun 16, 2026
pahor167 pushed a commit that referenced this pull request Jun 16, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to master, this PR
will be updated.


# Releases
## @celo/actions@0.2.2

### Patch Changes

- [#782](#782)
[`9d19100`](9d19100)
Thanks [@pahor167](https://github.com/pahor167)! - Fix several
`governance`/`celocli` command output & safety issues:
- `governance:propose` logged `undefined is a proxy, repointing to ...`
for
core-contract proxy repoints (logged `tx.address` which is undefined
when the
    tx is keyed by `contract`); now logs the real proxy id.
- `governance:propose` now surfaces the new proposal id
(`ProposalQueued`), and
the `--useMultiSig` path surfaces the multisig transaction id
(`Submission` on
submit, `Confirmation` on a later signer) plus the proposal id when the
submit
    reaches threshold and executes in the same receipt.
- `@celo/actions` `getGroupsWithPendingVotes` now filters on pending
votes `> 0`
(was `>= 0`, which returned every group); fixes `election:activate`
selecting
    groups with no pending votes.
- `governance:execute` now checks the proposal is approved before
sending, so it
fails the precondition cleanly instead of reverting with "Proposal not
approved".
- `governance:upvote`/`revokeupvote`/`votePartially` and
`multisig:approve` now
decode and print their on-chain events (proposal id / transaction id).
- `governance:propose` can now build a core-contract call whose method
is added
by an earlier upgrade tx in the same proposal: when the method is absent
from
the bundled ABI, it is resolved from the implementation a prior tx
repoints the
proxy to (verified metadata), with a raw `function: "name(uint256)"`
signature
    fallback.
  - `governance:propose` now simulates the proposal by default against a
self-contained local fork (bundled `@foundry-rs/anvil`) of the connected
node,
applying the transactions in order so a transaction that depends on an
earlier
one (e.g. a method added by a prior upgrade tx) simulates correctly. Use
`--simulate <rpcUrl>` to target an external fork, or `--no-simulate` to
fall
    back to the previous independent per-transaction `eth_call` checks.
- `lockedcelo:withdraw` (and `releasecelo:locked-gold` withdraw) no
longer spin
in an infinite loop when no pending withdrawal is available, and
re-fetch
    between withdrawals to avoid stale indices.
- `@celo/dev-utils` anvil test harness now resolves the
foundry-installed
`anvil` (snapshot-compatible) instead of a package-manager `anvil` bin
shim,
so packages that bundle a newer anvil don't break the devchain state
load.
- `@celo/explorer` `fetchMetadata` now uses the Sourcify v2 API (the v1
repo API
    has been sunset / returns 503), so contract ABI resolution (used by
    `governance:propose` to build calls to verified contracts, including
    implementations added by an in-proposal upgrade) works again.
## @celo/celocli@9.0.1

### Patch Changes

- [#782](#782)
[`9d19100`](9d19100)
Thanks [@pahor167](https://github.com/pahor167)! - Fix several
`governance`/`celocli` command output & safety issues:
- `governance:propose` logged `undefined is a proxy, repointing to ...`
for
core-contract proxy repoints (logged `tx.address` which is undefined
when the
    tx is keyed by `contract`); now logs the real proxy id.
- `governance:propose` now surfaces the new proposal id
(`ProposalQueued`), and
the `--useMultiSig` path surfaces the multisig transaction id
(`Submission` on
submit, `Confirmation` on a later signer) plus the proposal id when the
submit
    reaches threshold and executes in the same receipt.
- `@celo/actions` `getGroupsWithPendingVotes` now filters on pending
votes `> 0`
(was `>= 0`, which returned every group); fixes `election:activate`
selecting
    groups with no pending votes.
- `governance:execute` now checks the proposal is approved before
sending, so it
fails the precondition cleanly instead of reverting with "Proposal not
approved".
- `governance:upvote`/`revokeupvote`/`votePartially` and
`multisig:approve` now
decode and print their on-chain events (proposal id / transaction id).
- `governance:propose` can now build a core-contract call whose method
is added
by an earlier upgrade tx in the same proposal: when the method is absent
from
the bundled ABI, it is resolved from the implementation a prior tx
repoints the
proxy to (verified metadata), with a raw `function: "name(uint256)"`
signature
    fallback.
  - `governance:propose` now simulates the proposal by default against a
self-contained local fork (bundled `@foundry-rs/anvil`) of the connected
node,
applying the transactions in order so a transaction that depends on an
earlier
one (e.g. a method added by a prior upgrade tx) simulates correctly. Use
`--simulate <rpcUrl>` to target an external fork, or `--no-simulate` to
fall
    back to the previous independent per-transaction `eth_call` checks.
- `lockedcelo:withdraw` (and `releasecelo:locked-gold` withdraw) no
longer spin
in an infinite loop when no pending withdrawal is available, and
re-fetch
    between withdrawals to avoid stale indices.
- `@celo/dev-utils` anvil test harness now resolves the
foundry-installed
`anvil` (snapshot-compatible) instead of a package-manager `anvil` bin
shim,
so packages that bundle a newer anvil don't break the devchain state
load.
- `@celo/explorer` `fetchMetadata` now uses the Sourcify v2 API (the v1
repo API
    has been sunset / returns 503), so contract ABI resolution (used by
    `governance:propose` to build calls to verified contracts, including
    implementations added by an in-proposal upgrade) works again.
- Updated dependencies
[[`9d19100`](9d19100)]:
  - @celo/governance@5.1.11
  - @celo/actions@0.2.2
  - @celo/explorer@5.1.1
## @celo/dev-utils@0.2.1

### Patch Changes

- [#782](#782)
[`9d19100`](9d19100)
Thanks [@pahor167](https://github.com/pahor167)! - Fix several
`governance`/`celocli` command output & safety issues:
- `governance:propose` logged `undefined is a proxy, repointing to ...`
for
core-contract proxy repoints (logged `tx.address` which is undefined
when the
    tx is keyed by `contract`); now logs the real proxy id.
- `governance:propose` now surfaces the new proposal id
(`ProposalQueued`), and
the `--useMultiSig` path surfaces the multisig transaction id
(`Submission` on
submit, `Confirmation` on a later signer) plus the proposal id when the
submit
    reaches threshold and executes in the same receipt.
- `@celo/actions` `getGroupsWithPendingVotes` now filters on pending
votes `> 0`
(was `>= 0`, which returned every group); fixes `election:activate`
selecting
    groups with no pending votes.
- `governance:execute` now checks the proposal is approved before
sending, so it
fails the precondition cleanly instead of reverting with "Proposal not
approved".
- `governance:upvote`/`revokeupvote`/`votePartially` and
`multisig:approve` now
decode and print their on-chain events (proposal id / transaction id).
- `governance:propose` can now build a core-contract call whose method
is added
by an earlier upgrade tx in the same proposal: when the method is absent
from
the bundled ABI, it is resolved from the implementation a prior tx
repoints the
proxy to (verified metadata), with a raw `function: "name(uint256)"`
signature
    fallback.
  - `governance:propose` now simulates the proposal by default against a
self-contained local fork (bundled `@foundry-rs/anvil`) of the connected
node,
applying the transactions in order so a transaction that depends on an
earlier
one (e.g. a method added by a prior upgrade tx) simulates correctly. Use
`--simulate <rpcUrl>` to target an external fork, or `--no-simulate` to
fall
    back to the previous independent per-transaction `eth_call` checks.
- `lockedcelo:withdraw` (and `releasecelo:locked-gold` withdraw) no
longer spin
in an infinite loop when no pending withdrawal is available, and
re-fetch
    between withdrawals to avoid stale indices.
- `@celo/dev-utils` anvil test harness now resolves the
foundry-installed
`anvil` (snapshot-compatible) instead of a package-manager `anvil` bin
shim,
so packages that bundle a newer anvil don't break the devchain state
load.
- `@celo/explorer` `fetchMetadata` now uses the Sourcify v2 API (the v1
repo API
    has been sunset / returns 503), so contract ABI resolution (used by
    `governance:propose` to build calls to verified contracts, including
    implementations added by an in-proposal upgrade) works again.
## @celo/explorer@5.1.1

### Patch Changes

- [#782](#782)
[`9d19100`](9d19100)
Thanks [@pahor167](https://github.com/pahor167)! - Fix several
`governance`/`celocli` command output & safety issues:
- `governance:propose` logged `undefined is a proxy, repointing to ...`
for
core-contract proxy repoints (logged `tx.address` which is undefined
when the
    tx is keyed by `contract`); now logs the real proxy id.
- `governance:propose` now surfaces the new proposal id
(`ProposalQueued`), and
the `--useMultiSig` path surfaces the multisig transaction id
(`Submission` on
submit, `Confirmation` on a later signer) plus the proposal id when the
submit
    reaches threshold and executes in the same receipt.
- `@celo/actions` `getGroupsWithPendingVotes` now filters on pending
votes `> 0`
(was `>= 0`, which returned every group); fixes `election:activate`
selecting
    groups with no pending votes.
- `governance:execute` now checks the proposal is approved before
sending, so it
fails the precondition cleanly instead of reverting with "Proposal not
approved".
- `governance:upvote`/`revokeupvote`/`votePartially` and
`multisig:approve` now
decode and print their on-chain events (proposal id / transaction id).
- `governance:propose` can now build a core-contract call whose method
is added
by an earlier upgrade tx in the same proposal: when the method is absent
from
the bundled ABI, it is resolved from the implementation a prior tx
repoints the
proxy to (verified metadata), with a raw `function: "name(uint256)"`
signature
    fallback.
  - `governance:propose` now simulates the proposal by default against a
self-contained local fork (bundled `@foundry-rs/anvil`) of the connected
node,
applying the transactions in order so a transaction that depends on an
earlier
one (e.g. a method added by a prior upgrade tx) simulates correctly. Use
`--simulate <rpcUrl>` to target an external fork, or `--no-simulate` to
fall
    back to the previous independent per-transaction `eth_call` checks.
- `lockedcelo:withdraw` (and `releasecelo:locked-gold` withdraw) no
longer spin
in an infinite loop when no pending withdrawal is available, and
re-fetch
    between withdrawals to avoid stale indices.
- `@celo/dev-utils` anvil test harness now resolves the
foundry-installed
`anvil` (snapshot-compatible) instead of a package-manager `anvil` bin
shim,
so packages that bundle a newer anvil don't break the devchain state
load.
- `@celo/explorer` `fetchMetadata` now uses the Sourcify v2 API (the v1
repo API
    has been sunset / returns 503), so contract ABI resolution (used by
    `governance:propose` to build calls to verified contracts, including
    implementations added by an in-proposal upgrade) works again.
## @celo/governance@5.1.11

### Patch Changes

- [#782](#782)
[`9d19100`](9d19100)
Thanks [@pahor167](https://github.com/pahor167)! - Fix several
`governance`/`celocli` command output & safety issues:
- `governance:propose` logged `undefined is a proxy, repointing to ...`
for
core-contract proxy repoints (logged `tx.address` which is undefined
when the
    tx is keyed by `contract`); now logs the real proxy id.
- `governance:propose` now surfaces the new proposal id
(`ProposalQueued`), and
the `--useMultiSig` path surfaces the multisig transaction id
(`Submission` on
submit, `Confirmation` on a later signer) plus the proposal id when the
submit
    reaches threshold and executes in the same receipt.
- `@celo/actions` `getGroupsWithPendingVotes` now filters on pending
votes `> 0`
(was `>= 0`, which returned every group); fixes `election:activate`
selecting
    groups with no pending votes.
- `governance:execute` now checks the proposal is approved before
sending, so it
fails the precondition cleanly instead of reverting with "Proposal not
approved".
- `governance:upvote`/`revokeupvote`/`votePartially` and
`multisig:approve` now
decode and print their on-chain events (proposal id / transaction id).
- `governance:propose` can now build a core-contract call whose method
is added
by an earlier upgrade tx in the same proposal: when the method is absent
from
the bundled ABI, it is resolved from the implementation a prior tx
repoints the
proxy to (verified metadata), with a raw `function: "name(uint256)"`
signature
    fallback.
  - `governance:propose` now simulates the proposal by default against a
self-contained local fork (bundled `@foundry-rs/anvil`) of the connected
node,
applying the transactions in order so a transaction that depends on an
earlier
one (e.g. a method added by a prior upgrade tx) simulates correctly. Use
`--simulate <rpcUrl>` to target an external fork, or `--no-simulate` to
fall
    back to the previous independent per-transaction `eth_call` checks.
- `lockedcelo:withdraw` (and `releasecelo:locked-gold` withdraw) no
longer spin
in an infinite loop when no pending withdrawal is available, and
re-fetch
    between withdrawals to avoid stale indices.
- `@celo/dev-utils` anvil test harness now resolves the
foundry-installed
`anvil` (snapshot-compatible) instead of a package-manager `anvil` bin
shim,
so packages that bundle a newer anvil don't break the devchain state
load.
- `@celo/explorer` `fetchMetadata` now uses the Sourcify v2 API (the v1
repo API
    has been sunset / returns 503), so contract ABI resolution (used by
    `governance:propose` to build calls to verified contracts, including
    implementations added by an in-proposal upgrade) works again.
- Updated dependencies
[[`9d19100`](9d19100)]:
  - @celo/explorer@5.1.1

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on updating several packages, particularly
`@celo/explorer`, `@celo/governance`, and `@Celo/Actions`, with new
versions and improvements. It addresses various command output and
safety issues in the governance and CLI commands.

### Detailed summary
- Removed: `.changeset/fix-propose-proxy-log-and-proposalid.md`
- Updated package versions:
  - `@Celo/Actions` to `v0.2.2`
  - `@celo/explorer` to `v5.1.1`
  - `@celo/governance` to `v5.1.11`
- Fixed governance command output issues.
- Enhanced logging for `governance:propose`.
- Improved filtering for pending votes in `@celo/actions`.
- Added simulation for proposals in `governance:propose`.
- Updated CLI command descriptions and links to new code locations.

> The following files were skipped due to too many changes:
`docs/command-line-interface/releasecelo.md`,
`docs/command-line-interface/governance.md`,
`docs/sdk/governance/classes/ProposalBuilder.md`,
`docs/sdk/explorer/classes/BlockExplorer.md`,
`docs/command-line-interface/account.md`

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

<!-- end pr-codex -->

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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