Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print old contract when overriding existing alias. #1841

Merged
merged 3 commits into from
Jan 21, 2025
Merged

Conversation

fnando
Copy link
Member

@fnando fnando commented Jan 21, 2025

What

Print old contract when overriding existing alias. Notice that we're bypassing the rich printer, because it can be silenced. Instead, we print the contract straight to stderr unconditionally.

$ stellar contract deploy --wasm target/wasm32-unknown-unknown/release/hello_world.wasm --alias=hello
ℹ️ Skipping install because wasm already installed
ℹ️ Using wasm hash 89123eaa2902ec32e26db0141e2d0247e5e00846489f4d8b17d597a85466e863
ℹ️ Simulating deploy transaction…
🌎 Submitting deploy transaction…
ℹ️ Transaction hash is ab3a11357ef533134efd4685985ac19f464e48be86d9732fbc81abcdab6e8c56
🔗 https://stellar.expert/explorer/testnet/tx/ab3a11357ef533134efd4685985ac19f464e48be86d9732fbc81abcdab6e8c56
ℹ️ Signing transaction: ab3a11357ef533134efd4685985ac19f464e48be86d9732fbc81abcdab6e8c56
🔗 https://stellar.expert/explorer/testnet/contract/CCR3PGO7L4RVITA5OR3ZVL5542L53M73PFMJLDY4KY7L6S3ODVXQW6SB
✅ Deployed!
⚠️ Overwriting existing contract id: CAFY4HM4RZSNPQKEV5GDIQRMWO6SJJNMIPSCP4Z4KEP5IZRYCJJFJNBC
CCR3PGO7L4RVITA5OR3ZVL5542L53M73PFMJLDY4KY7L6S3ODVXQW6SB

With --quiet:

$ stellar contract deploy --wasm target/wasm32-unknown-unknown/release/hello_world.wasm --alias=hello --quiet   
ℹ️  Signing transaction: 7f7a7d89321bdd17753d5a00c833c4861f4ff4d6eed654099b05ebd5939ca342
⚠️  Overwriting existing contract id: CBU4J2PH6JUVAF7BFSTWGIBFJUZBZ4V3YHFEIK7AFB4FM53FEGAJD3PP
CBA5HVEZ5O3V6ILGWPKDS3TNTMX7VZ3F5EJVIN7TEEPA7O2RNKZLR5JH

PS: Notice that the signing transaction logging is a bug; we're tracking it at #1840.

Why

Close #1417.

Known limitations

N/A

@fnando fnando requested a review from leighmcculloch January 21, 2025 21:34
@fnando fnando self-assigned this Jan 21, 2025
@leighmcculloch
Copy link
Member

I think it's fine if quite doesn't print the old contract ID. Why do we need to print it even if quieted?

@fnando
Copy link
Member Author

fnando commented Jan 21, 2025

Sounds good to me! :)

@fnando fnando enabled auto-merge (squash) January 21, 2025 22:13
@fnando fnando merged commit d2fc781 into main Jan 21, 2025
23 of 25 checks passed
@fnando fnando deleted the alias-override branch January 21, 2025 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Alias is currently overwrote with no warning
3 participants