Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions examples/fee-forwarder-permissioned/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/fee-forwarder-permissionless/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/fungible-allowlist/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true
Comment on lines +9 to +10
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify whether workspace-level stellar metadata exists and where inheritance is used.
set -euo pipefail

echo "== Root/workspace stellar metadata tables =="
rg -n '^\[workspace\.metadata\.stellar\]' Cargo.toml || true

echo
echo "== Crates using package.metadata.stellar and cargo_inherit = true =="
rg -n '^\[package\.metadata\.stellar\]|^cargo_inherit\s*=\s*true' --type toml

Repository: OpenZeppelin/stellar-contracts

Length of output: 7161


🏁 Script executed:

# Check the root Cargo.toml for workspace configuration
cat -n Cargo.toml | head -50

Repository: OpenZeppelin/stellar-contracts

Length of output: 1958


🏁 Script executed:

# Check if there's any workspace.metadata section (even without stellar)
rg -n '^\[workspace' Cargo.toml

Repository: OpenZeppelin/stellar-contracts

Length of output: 138


🏁 Script executed:

# Verify if cargo_inherit appears in the git history to understand if it's new
git log --oneline --all -S 'cargo_inherit' | head -10

Repository: OpenZeppelin/stellar-contracts

Length of output: 160


Add workspace-level Stellar metadata to root Cargo.toml to make cargo_inherit effective

The pattern of using cargo_inherit = true appears across 60+ crates in this repository, but the root Cargo.toml lacks a [workspace.metadata.stellar] section to inherit from. This means the inheritance directive is currently a no-op and won't achieve the SEP-49 metadata consistency objective across the workspace.

Add a [workspace.metadata.stellar] section to the root Cargo.toml with the appropriate metadata entries, or replace cargo_inherit = true with explicit values in each crate if inheritance is not intended.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@examples/fungible-allowlist/Cargo.toml` around lines 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.


[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/fungible-blocklist/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/fungible-capped/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/fungible-governor-timelock/governor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true
Comment on lines +9 to +10
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify whether workspace-level stellar metadata exists and where cargo_inherit is used.

set -euo pipefail

echo "== Workspace Cargo manifests =="
fd -a '^Cargo\.toml$' | sed 's#^\./##'

echo
echo "== Find workspace metadata.stellar blocks =="
rg -n --type toml '^\[workspace\.metadata\.stellar\]|^cargo_inherit\s*='

echo
echo "== Find package metadata.stellar blocks =="
rg -n --type toml '^\[package\.metadata\.stellar\]|^cargo_inherit\s*='

Repository: OpenZeppelin/stellar-contracts

Length of output: 13642


Add [workspace.metadata.stellar] to the root Cargo.toml

This file uses cargo_inherit = true, but the root workspace Cargo.toml has no [workspace.metadata.stellar] block. The same pattern appears across 50+ crates in this repository—all declaring cargo inheritance without a source to inherit from. This prevents SEP-49 metadata inheritance from working as intended.

Add to root Cargo.toml
+[workspace.metadata.stellar]
+# define shared stellar metadata inherited by member crates
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@examples/fungible-governor-timelock/governor/Cargo.toml` around lines 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.


[lib]
crate-type = ["cdylib", "rlib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/fungible-governor-timelock/token/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/fungible-governor/governor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib", "rlib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/fungible-governor/token/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/fungible-merkle-airdrop/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/fungible-pausable/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/fungible-vault/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/fungible-votes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/merkle-voting/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/multisig-smart-account/account/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/multisig-smart-account/ed25519-verifier/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/multisig-smart-account/threshold-policy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/multisig-smart-account/webauthn-verifier/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/nft-access-control/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/nft-consecutive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/nft-enumerable/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/nft-royalties/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/nft-sequential-minting/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/ownable/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/pausable/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/rwa/claim-issuer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/rwa/claim-topics-and-issuers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/rwa/compliance/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/rwa/identity-registry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/rwa/identity-verifier/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/rwa/identity/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/rwa/sign-claim/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ version = "0.7.0"
name = "rwa-sign-claim"
path = "src/main.rs"

[package.metadata.stellar]
cargo_inherit = true

[dependencies]
ed25519-dalek = "2.1.1"
stellar-strkey = "0.0.16"
Expand Down
3 changes: 3 additions & 0 deletions examples/rwa/token/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/sac-admin-generic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/sac-admin-wrapper/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/timelock-controller/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version.workspace = true

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib", "rlib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/upgradeable/lazy-v1/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version = "1.0.0"

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
3 changes: 3 additions & 0 deletions examples/upgradeable/lazy-v2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ repository.workspace = true
publish = false
version = "2.0.0"

[package.metadata.stellar]
cargo_inherit = true

[lib]
crate-type = ["cdylib"]
doctest = false
Expand Down
Loading