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

Soroban contract init followup #1176

Merged

Conversation

elizabethengelman
Copy link
Contributor

@elizabethengelman elizabethengelman commented Jan 25, 2024

What

This PR acts as a follow up for PR #1156, handling comments that weren't initially handled in the original PR:

  • add a --frontend-template flag
  • make sure that FE template code works
  • update the gix crate
  • update template repo: https://github.com/AhaLabs/soroban-init-template
  • generate possible example contracts to be included at runtime
  • add a fuzz test / fuzz setup example I'm leaning toward omitting the fuzzing example from being included by default in the initialized project, since this is a more advanced topic. Users will still be able to include it with the --with-example flag.
  • add an optional --template flag Also leaning toward omitting this, which was based on a comment in the previous PR. Since the base structure of the rust template is pretty bare-bones, I'm hoping it will be sufficient for lots of use cases to start. And then users will be able to expand the base project by adding examples contracts (--with-examples) and a frontend template (--frontend-template).
  • messaging about limited functionality with no internet access

@elizabethengelman elizabethengelman force-pushed the soroban-contract-init-followup branch from a9c4c59 to ef4902b Compare January 30, 2024 20:02
elizabethengelman and others added 6 commits January 30, 2024 16:21
* Remove panic - 1

* Remove panic - 2

* Remove panic - 3

* Remove panic - 4

* Small changes - 1

* undo changes in Get() func

* undo changes - 2

* undo changes - 3

* add test for append error
@elizabethengelman elizabethengelman marked this pull request as ready for review January 30, 2024 23:01
@elizabethengelman elizabethengelman force-pushed the soroban-contract-init-followup branch from ef4902b to 5517a65 Compare January 31, 2024 16:55
Copy link
Contributor

@chadoh chadoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor nitpicks, but this looks really good! I am open to whatever you decide, wrt how to implement the --frontend-template option.

cmd/soroban-cli/src/commands/contract/init.rs Outdated Show resolved Hide resolved
cmd/soroban-cli/src/commands/contract/init.rs Show resolved Hide resolved
cmd/soroban-cli/src/commands/contract/init.rs Outdated Show resolved Hide resolved
cmd/soroban-cli/src/commands/contract/init.rs Show resolved Hide resolved
@elizabethengelman elizabethengelman force-pushed the soroban-contract-init-followup branch from 7093762 to 4d797c5 Compare February 5, 2024 15:12
@elizabethengelman elizabethengelman enabled auto-merge (squash) February 7, 2024 14:13
@elizabethengelman elizabethengelman merged commit 9bcf8e2 into stellar:main Feb 7, 2024
25 checks passed
@chadoh chadoh deleted the soroban-contract-init-followup branch February 7, 2024 16:53
psheth9 pushed a commit that referenced this pull request Feb 7, 2024
* Upgrade gix version to 0.58.0

* Add frontend template option

* Use a custom value_parser for with_examples

* Pull possible example contracts from soroban-examples repo

* Check if there is an internet connection and handle if not
---------

Co-authored-by: Chad Ostrowski <221614+chadoh@users.noreply.github.com>
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.

3 participants