Skip to content

Guide for Stellar smart contract init templates - #806

Merged
briwylde08 merged 13 commits into
stellar:mainfrom
hydroxylase:template
Aug 12, 2024
Merged

briwylde08 merged 13 commits into
stellar:mainfrom
hydroxylase:template

Conversation

@hydroxylase

Copy link
Copy Markdown
Contributor

@briwylde08 My code is ready for review!

@briwylde08

Copy link
Copy Markdown
Contributor

Amazing! We'll get this assigned and reviewed. FYI we have given reviewers three weeks to look things over.

Solves: #611

@briwylde08 briwylde08 changed the title Created and Written Documentation for soroban contract init template Guide for Stellar smart contract init templates Jul 19, 2024

@ElliotFriend ElliotFriend left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi, @CaptainPrinz!! This is a really good breakdown of the process and the init script! I've left a few (mostly) minor nitpicks and suggestions throughout.

There's one more thing I think it would be worth touching on. Let's give a simple example of actually using the bindings in the templated project. For example, the Astro template integrates a greeting from the hello world contract into it, so it's not just a blank, empty Astro project after you've initialized it. It's a good touch to make sure that the template actually works "out of the box." This will probably require a little bit of work in the template repo, too. And, you might need to integrate the "Hello World" contract in the stellar contract init command, rather than the "Tokens" contract. Then, you can add a brief section like "open up the path/to/react/component.ts file and see how we've integrated etc., etc., etc." to this guide.

That change will take this guide from being a useful, descriptive walkthrough of the init script, and turn it into a more full-featured example, as well as a more useable init template overall.

@hydroxylase

Copy link
Copy Markdown
Contributor Author

Okay will go through and make the adjustments

@hydroxylase

Copy link
Copy Markdown
Contributor Author

@ElliotFriend just updated the file with the require section

Editorial suggestions implemented where necessary
@hydroxylase

Copy link
Copy Markdown
Contributor Author

@ElliotFriend I have implemented most of the suggestions. Waiting for Final checks from you!

@ElliotFriend ElliotFriend left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@CaptainPrinz

You've made some really good progress here! There are still some unresolved issues from the first review that got missed, and I've added a few comments to the newer stuff.

The main thing left to work on is making sure that the template actually works the way you're describing. I went through the process you've outlined here, and there were some errors I ran into along the way. I suggest you walk through the process, starting with the stellar contract init `hello_contract` -w hello -f https://github.com/CaptainPrinz/soroban-react-template.git command, and fix any trouble (likely in that template repo) along the way.

@hydroxylase

Copy link
Copy Markdown
Contributor Author

I hope this time the issues are fixed once and for all @ElliotFriend .

@hydroxylase

Copy link
Copy Markdown
Contributor Author

@Julian-dev28 @ElliotFriend waiting for more feedback

@briwylde08

Copy link
Copy Markdown
Contributor

Hi @CaptainPrinz! Reviewers will provide further review most likely early next week! Thank you for your patience!

@briwylde08

Copy link
Copy Markdown
Contributor

Hi @CaptainPrinz, sorry for the delay on this one. We'll provide further review asap.

@ElliotFriend ElliotFriend left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi, there @CaptainPrinz! Sorry for the delay.

This is looking really close! I'm having some trouble with the initialize.js script in your templates repo. Once following the step-by-step gives us a read-to-go project boilerplate. This'll be ready to merge! 😁

Also, looks like you've got some MDX formatting problems in the file. If you run yarn format:mdx in the stellar-docs repository, it should take care of it for you.

@hydroxylase

Copy link
Copy Markdown
Contributor Author

Apologies @ElliotFriend . You're right putting the network passphrase solves the issue. However I cant seem to find the solution for the script that generates the contracts bindings. I'd appreciate if you could lend me a hand. Ill try as much as possible to crack this. Meanwhile I'm having a really bad internet so this could take a day or two to sort out completely as the upload/download speeds are terrible

Updated the script for starting the template
@hydroxylase

Copy link
Copy Markdown
Contributor Author

Fixed

@ElliotFriend ElliotFriend left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey, there @CaptainPrinz!!! Thanks SO MUCH for all the work you've put into this! It's turned out great, and I'm excited to get it merged in! I figured out a couple of the tiny errors i was getting from the init script, and made CaptainPrinz/soroban-react-template#1 to address them.

Thanks again for getting this across the finish line. Sorry for the busy-ness that led to some delays for the reviews. Well done!

@hydroxylase

Copy link
Copy Markdown
Contributor Author

Glad this worked out.
Please don't say that's we all have one or more busy-ness to take care of ;)

Once again, I appreciate your effort going through the code

@briwylde08

Copy link
Copy Markdown
Contributor

Hi @CaptainPrinz @ElliotFriend! Just want to confirm this one is ready to merge?

@ElliotFriend

Copy link
Copy Markdown
Contributor

Yeah, let's merge it! 😁

@briwylde08

Copy link
Copy Markdown
Contributor

Amazing! Ok, I'll merge and then we can take the award conversation back to the corresponding issue!

@briwylde08
briwylde08 merged commit c51050e into stellar:main Aug 12, 2024
janewang pushed a commit that referenced this pull request Sep 12, 2024
* Created and Written DOcumentation for soroban contract init template

* Editorial & formatting

* Update soroban-contract-init-template.mdx

Added a section explaining how to use the bindings

* Implemented Suggestions

Editorial suggestions implemented where necessary

* put alias in back-ticks

* Update soroban-contract-init-template.mdx

Issues fixed

* Update soroban-contract-init-template.mdx

Final issues resolved hopefully

* Update soroban-contract-init-template.mdx

Fixing more errors

* formatting

* formatting again

* Update soroban-contract-init-template.mdx

Updated the script for starting the template

---------

Co-authored-by: Bri <[email protected]>
Co-authored-by: Elliot Voris <[email protected]>
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