Skip to content

Retro/ballots: Interacts with ballots on Agora: retrieve or submit#53

Merged
raiseerco merged 11 commits intofeature/optigovfrom
retro/ballots
Apr 14, 2025
Merged

Retro/ballots: Interacts with ballots on Agora: retrieve or submit#53
raiseerco merged 11 commits intofeature/optigovfrom
retro/ballots

Conversation

@luisvid
Copy link
Collaborator

@luisvid luisvid commented Apr 8, 2025

Feature: Interact with Ballots on Agora

This PR introduces the ability to retrieve or submit ballots from the Agora governance system via the optigov CLI.

Usage

optigov ballots \
  [--action <get|submit>] \
  [--address <WALLET_ADDRESS>] \
  [--address-or-ens-name <ADDRESS_OR_ENS>] \
  [--ballot-content <BALLOT_JSON>] \
  [--round-id <ROUND_ID>] \
  [--signature <SIGNED_PAYLOAD>]

Example

Autocompleted (and copied to clipboard):

optigov ballots --action get --round-id 6 --address-or-ens-name 0x2bEB8D9eD2cE57E124D195e414d23681559577f7

Sample Output (Get Ballot)

╭ Ballot for Round 6 & 0x2bEB8D9eD2cE57E124D195e414d23681559577f7 ───────────╮
│                                                                            │
│   Address:        0x2beb8d9ed2ce57e124d195e414d23681559577f7               │
│   Round ID:       6                                                       │
│   Status:         NOT STARTED                                             │
│   Budget:         null                                                    │
│   Created At:     null                                                    │
│   Updated At:     null                                                    │
│   Published At:   undefined                                               │
│                                                                            │
│   Category Allocations:                                                   │
│                                                                            │
│   Projects to be Evaluated:                                               │
│     - 0x7354...02b7                                                       │
│     - 0x7c01...ecd7                                                       │
│     - ...                                                                 │
│     - 0x32e7...dd75                                                       │
│     - 0xfc0a...1860                                                       │
│                                                                            │
│   Payload for Signature:                                                  │
│     Budget:              undefined                                        │
│     Category Allocation: undefined                                        │
│     Projects Allocation: undefined                                        │
│                                                                            │
╰────────────────────────────────────────────────────────────────────────────╯

@luisvid luisvid requested a review from raiseerco April 8, 2025 20:44
@luisvid luisvid self-assigned this Apr 8, 2025
@luisvid luisvid changed the base branch from feature/optigov to main April 8, 2025 20:44
@luisvid luisvid changed the base branch from main to feature/optigov April 8, 2025 20:45
@coveralls
Copy link

coveralls commented Apr 8, 2025

Pull Request Test Coverage Report for Build 14454786000

Details

  • 96 of 101 (95.05%) changed or added relevant lines in 9 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.5%) to 70.449%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/ethernaut-optigov/src/tasks/setAgoraKey.js 16 18 88.89%
packages/ethernaut-optigov/src/tasks/Ballots.js 56 59 94.92%
Totals Coverage Status
Change from base Build 14207996823: 0.5%
Covered Lines: 2694
Relevant Lines: 3522

💛 - Coveralls

Copy link
Collaborator

@raiseerco raiseerco left a comment

Choose a reason for hiding this comment

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

Overall LGTM, let's have a call to fine tune the final touches.

Copy link
Collaborator

@raiseerco raiseerco left a comment

Choose a reason for hiding this comment

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

🚀

@raiseerco raiseerco merged commit a2b3025 into feature/optigov Apr 14, 2025
36 checks passed
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.

3 participants