Migrate proposals from Bag to ObjectBag#459
Open
Bridgerz wants to merge 1 commit intocli-governance-improvementsfrom
Open
Migrate proposals from Bag to ObjectBag#459Bridgerz wants to merge 1 commit intocli-governance-improvementsfrom
Bridgerz wants to merge 1 commit intocli-governance-improvementsfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
0x2::object_bag::ObjectBaginstead of0x2::bag::BagProposal<T>gets a first-class Sui object identity — directly queryable viasui_getObject, visible in explorersfetch_proposal_detailsupdated to read fromchild_object(DynamicObject kind) instead of inlineDynamicFieldvalue fieldsProposal<T>already hadkey + storeabilities so no Move-side ability changes neededStacked on #458 → #456. Retarget to
mainonce those land.Test plan
cargo check --tests+cargo clippyclean under-Dwarnings🤖 Generated with Claude Code