Repository navigation
add stellar metadata section to contract cargo.toml files - #680
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughThis pull request adds a Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@examples/fungible-allowlist/Cargo.toml`:
- Around line 9-10: The root Cargo.toml is missing a
[workspace.metadata.stellar] section so the per-crate setting
package.metadata.stellar.cargo_inherit = true is a no-op; add a top-level
[workspace.metadata.stellar] block in the root Cargo.toml containing the
canonical SEP-49 fields you expect to share (the same keys present in individual
package.metadata.stellar blocks) so cargo_inherit works, or alternatively remove
cargo_inherit = true from crates and copy those explicit values into each
package.metadata.stellar block; locate usages by searching for
package.metadata.stellar and cargo_inherit to mirror the shared metadata into
workspace.metadata.stellar.
In `@examples/fungible-governor-timelock/governor/Cargo.toml`:
- Around line 9-10: The crates declare cargo_inherit = true under
[package.metadata.stellar] but there is no root source to inherit from; add a
[workspace.metadata.stellar] block to the root Cargo.toml providing the shared
SEP-49 metadata (the keys that child crates expect) so cargo_inherit can work;
update the root Cargo.toml to include a [workspace.metadata.stellar] section
with the canonical fields used by child crates (matching the names under
package.metadata.stellar) rather than adding metadata to each crate.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 9b5f7d0f-1576-453b-acad-de36c1c2cbcd
📒 Files selected for processing (52)
examples/fee-forwarder-permissioned/Cargo.tomlexamples/fee-forwarder-permissionless/Cargo.tomlexamples/fungible-allowlist/Cargo.tomlexamples/fungible-blocklist/Cargo.tomlexamples/fungible-capped/Cargo.tomlexamples/fungible-governor-timelock/governor/Cargo.tomlexamples/fungible-governor-timelock/token/Cargo.tomlexamples/fungible-governor/governor/Cargo.tomlexamples/fungible-governor/token/Cargo.tomlexamples/fungible-merkle-airdrop/Cargo.tomlexamples/fungible-pausable/Cargo.tomlexamples/fungible-vault/Cargo.tomlexamples/fungible-votes/Cargo.tomlexamples/merkle-voting/Cargo.tomlexamples/multisig-smart-account/account/Cargo.tomlexamples/multisig-smart-account/ed25519-verifier/Cargo.tomlexamples/multisig-smart-account/spending-limit-policy/Cargo.tomlexamples/multisig-smart-account/threshold-policy/Cargo.tomlexamples/multisig-smart-account/webauthn-verifier/Cargo.tomlexamples/multisig-smart-account/weighted-threshold-policy/Cargo.tomlexamples/nft-access-control/Cargo.tomlexamples/nft-consecutive/Cargo.tomlexamples/nft-enumerable/Cargo.tomlexamples/nft-royalties/Cargo.tomlexamples/nft-sequential-minting/Cargo.tomlexamples/ownable/Cargo.tomlexamples/pausable/Cargo.tomlexamples/rwa/claim-issuer/Cargo.tomlexamples/rwa/claim-topics-and-issuers/Cargo.tomlexamples/rwa/compliance/Cargo.tomlexamples/rwa/identity-registry/Cargo.tomlexamples/rwa/identity-verifier/Cargo.tomlexamples/rwa/identity/Cargo.tomlexamples/rwa/sign-claim/Cargo.tomlexamples/rwa/token/Cargo.tomlexamples/sac-admin-generic/Cargo.tomlexamples/sac-admin-wrapper/Cargo.tomlexamples/timelock-controller/Cargo.tomlexamples/upgradeable/lazy-v1/Cargo.tomlexamples/upgradeable/lazy-v2/Cargo.tomlexamples/upgradeable/upgrader/Cargo.tomlexamples/upgradeable/v1/Cargo.tomlexamples/upgradeable/v2/Cargo.tomlpackages/access/Cargo.tomlpackages/accounts/Cargo.tomlpackages/contract-utils/Cargo.tomlpackages/fee-abstraction/Cargo.tomlpackages/governance/Cargo.tomlpackages/macros/Cargo.tomlpackages/test-utils/event-assertion/Cargo.tomlpackages/tokens/Cargo.tomlpackages/zk-email/Cargo.toml
|
hey, thanks for flagging but this is actually fine - cargo_inherit = true in the stellar context inherits from the crate's own [package] section (name -> name, version -> binver, authors -> authors, etc.), not from workspace.metadata.stellar. it's processed by stellar-scaffold-cli, not standard cargo. you can see the same pattern in the contracts-wizard PR #613 and in stellar-core's own test contracts. no workspace-level section needed here. |
|
@knQzx thanks for this! Could you also add |
|
@ozgunozerk done, added authors.workspace = true to all examples |
ozgunozerk
left a comment
There was a problem hiding this comment.
LGTM!
@brozorec, does this sound ok to you? If so, we can merge
summary
test plan
fixes #341
Summary by CodeRabbit