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

host error for contract existing value outputs contract id hash rather than contract address #1500

Open
leighmcculloch opened this issue Dec 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@leighmcculloch
Copy link
Member

What version are you using?

Protocol 22

What did you do?

Try to deploy an asset twice, where the first time it deployed successfully.

❯ stellar contract asset deploy --asset ABC:$(stellar keys address a)
❯ stellar contract asset deploy --asset ABC:$(stellar keys address a)

What did you expect to see?

The second time to display a error that could be understood by the user, where the contract address would be emitted as a C address.

What did you see instead?

An error with the contract ID displayed as a hex string.

❯ stellar contract asset deploy --asset ABC:$(stellar keys address a)
2024-12-13T08:27:36.552034Z ERROR soroban_cli::assembled: 0: "AAAAAAAAAAAAAAAAAAAAAgAAAAAAAAACAAAADwAAAAVlcnJvcgAAAAAAAAIAAAADAAAABAAAABAAAAABAAAAAgAAAA4AAAAXY29udHJhY3QgYWxyZWFkeSBleGlzdHMAAAAADQAAACCxdXaTv6o23MQp63HScGnKh7Hrfn620g/acIXeY3snjg=="
❌ error: transaction simulation failed: HostError: Error(Storage, ExistingValue)

Event log (newest first):
   0: [Diagnostic Event] topics:[error, Error(Storage, ExistingValue)], data:["contract already exists", Bytes(b1757693bfaa36dcc429eb71d27069ca87b1eb7e7eb6d20fda7085de637b278e)]
@leighmcculloch leighmcculloch added the bug Something isn't working label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant