Skip to content

test(guess-the-number): register XLM with register_import! - #290

Open
pselle wants to merge 3 commits into
mainfrom
register-import-xlm
Open

pselle wants to merge 3 commits into
mainfrom
register-import-xlm

Conversation

@pselle

@pselle pselle commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Uses stellar-registry/cli#65's register_import!, released in stellar-registry 0.1.4.

guess-the-number used import_asset!("xlm") outside tests and a hand-written stand-in asset, kept in contract storage, inside them. Now the contract uses import_asset!("xlm") everywhere, and the tests put a mintable test asset at that same address with register_import!(env, xlm). Because the asset is already there in tests, reset no longer needs #[cfg(not(test))] around xlm::register: its existence check passes and nothing is deployed.

Replaces the #[cfg(test)] stand-in asset with stellar-registry 0.1.4's
register_import!, so the contract has one code path for XLM.

Co-Authored-By: Claude <noreply@anthropic.com>
@pselle pselle self-assigned this Nov 11, 2026
@socket-security

socket-security Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedcargo/​stellar-registry@​0.1.2 ⏵ 0.1.410010093100100

View full report

@pselle
pselle force-pushed the register-import-xlm branch from 04dbe8c to 22ef7b0 Compare November 11, 2026 19:29
@pselle
pselle marked this pull request as ready for review November 11, 2026 19:32

@chadoh chadoh left a comment

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.

🎉

This branch has not been deployed

No deployments
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.

2 participants