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

Update template contract to be the same as soroban-examples #1857

Closed
wants to merge 1 commit into from

Conversation

elizabethengelman
Copy link
Contributor

What

This is an update to the Hello World contract that is created on stellar contract init to be more simliar to what is in soroban-examples.

Why

After reviewing the Getting Started guide in the docs, I noticed that the contract that we're creating when running stellar contract init is different than what is in soroban-examples and perhaps it would be less confusing for users if these were the same.

Known limitations

Related PR: stellar/stellar-docs#1239

@fnando
Copy link
Member

fnando commented Jan 29, 2025

We should actually do the other way around: update examples and docs to use Contract. Changing to a generic Contract was the goal for new contracts. The idea is to avoid having a named struct that won't give you any benefit due to how modules work in rust. It's one less thing to do when using stellar contract init; renaming the struct is 100% unnecessary and must be done on different files.

This changed on #1609 after an internal discussion.

@elizabethengelman
Copy link
Contributor Author

We should actually do the other way around: update examples and docs to use Contract. Changing to a generic Contract was the goal for new contracts.

Ah, that makes sense. Thanks for the context! I have a PR over on the docs that updates HelloWorld -> Contract that was just merged so docs should be good. And, I'll close this PR, and will plan to open one on the examples repo as well.

@elizabethengelman elizabethengelman deleted the fix/update-hello-world-contract branch January 29, 2025 18:17
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.

2 participants