Conversation
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 45d958eee5
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const hash = await walletClient.sendTransaction({ | ||
| to: tx.to as StrongAddress, | ||
| value: BigInt(tx.value ?? 0), | ||
| data: (tx.input ?? '0x') as Hex, | ||
| }) |
There was a problem hiding this comment.
Avoid requiring governance to pay gas in simulation
Sending each proposal step via walletClient.sendTransaction makes the governance address the top-level transaction sender, so simulation can fail with insufficient-funds/unlocked-account errors even when the proposal would execute on-chain. In production execution, an external executor pays gas and Governance only performs internal calls, so this introduces false negatives for governance:propose --simulate (especially on forks where Governance has low balance).
Useful? React with 👍 / 👎.
size-limit report 📦
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #775 +/- ##
=======================================
Coverage 69.61% 69.61%
=======================================
Files 150 150
Lines 7075 7075
Branches 1163 1146 -17
=======================================
Hits 4925 4925
- Misses 2046 2062 +16
+ Partials 104 88 -16
🚀 New features to boost your workflow:
|
Adds a
--simulate <RPC_URL>flag tocelocli governance:propose. When set, each proposal transaction is sent (noteth_call) against the given RPC, withfrom = Governance contract address. The node must have that address unlocked (e.g. anvil run with--auto-impersonate). Failures are reported with the decoded revert reason. The proposal isn't submitted on-chain if any tx fails.Replaces the default
eth_call-based simulation only when--simulateis set; mutually exclusive with--force.PR-Codex overview
This PR introduces a
--simulateflag for thegovernance:proposecommand, allowing for proposal execution simulation against a forked node. It enhances proposal checks and adds functionality to simulate transaction execution, improving the governance process.Detailed summary
--simulateflag togovernance:proposecommand.checkProposalfunction to acceptgovernanceAddress.simulateProposalOnRpcfunction for simulating proposals.--simulateis specified.createCeloPublicClient.