Skip to content

Comments

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

Closed
elizabethengelman wants to merge 1 commit intomainfrom
fix/update-hello-world-contract
Closed

Update template contract to be the same as soroban-examples#1857
elizabethengelman wants to merge 1 commit intomainfrom
fix/update-hello-world-contract

Conversation

@elizabethengelman
Copy link
Collaborator

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
Collaborator 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