Skip to content

Migrate proposals from Bag to ObjectBag#459

Open
Bridgerz wants to merge 1 commit intocli-governance-improvementsfrom
proposals-to-object-bag
Open

Migrate proposals from Bag to ObjectBag#459
Bridgerz wants to merge 1 commit intocli-governance-improvementsfrom
proposals-to-object-bag

Conversation

@Bridgerz
Copy link
Copy Markdown
Contributor

Summary

  • Proposals now live in 0x2::object_bag::ObjectBag instead of 0x2::bag::Bag
  • Each Proposal<T> gets a first-class Sui object identity — directly queryable via sui_getObject, visible in explorers
  • Rust scraper and CLI fetch_proposal_details updated to read from child_object (DynamicObject kind) instead of inline DynamicField value fields
  • Proposal<T> already had key + store abilities so no Move-side ability changes needed

Stacked on #458#456. Retarget to main once those land.

Test plan

  • 74/74 Move tests pass
  • 282 Rust unit tests pass (240 hashi + 42 hashi-types)
  • Full workspace cargo check --tests + cargo clippy clean under -Dwarnings

🤖 Generated with Claude Code

Proposals now live in a `0x2::object_bag::ObjectBag` instead of
`0x2::bag::Bag`, giving each `Proposal<T>` a first-class Sui object
identity. Consequences:

- Proposals are individually addressable — `sui_getObject(<proposal_id>)`
  works directly, explorers show them, and indexers can subscribe.
- The gRPC `list_dynamic_fields` response populates `child_object` for
  ObjectBag entries (DynamicObject kind), so the scraper reads
  `child_object.object_type` + `child_object.contents` instead of the
  Bag-style `value_type` + `value`.
- The CLI's `fetch_proposal_details` mirrors the same change.

Move: `Proposal<T>` already had `key + store` abilities, so the only
changes are the Hashi struct field type, the constructor, the accessor
return types, and the test util.

Rust: `ObjectBag` is a type alias for `Bag` (same BCS layout: id +
size), so the only changes are in the gRPC scraping and CLI fetch
paths — updated to read from `child_object` rather than inline
`DynamicField` value fields.

74/74 Move tests pass. 240/240 + 42/42 Rust unit tests pass.
Full workspace check + clippy clean.
@Bridgerz Bridgerz requested a review from bmwill as a code owner April 16, 2026 04:22
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.

1 participant