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

Add extensions section #79

Merged
merged 10 commits into from
Aug 27, 2024
Merged

Add extensions section #79

merged 10 commits into from
Aug 27, 2024

Conversation

edakturk14
Copy link
Collaborator

hey @Pabl0cks, @technophile-04 - as per #75, here's an initial extensions section.

Lmk what you think, happy to make any changes + additions as needed!

Copy link

vercel bot commented Aug 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
scaffold-eth-2-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 26, 2024 4:11pm

@edakturk14
Copy link
Collaborator Author

also adding @carletex and @rin-st if you have any ideas for this section :)

@portdeveloper
Copy link
Collaborator

portdeveloper commented Aug 23, 2024

Hey I think these are awesome!!!

I wonder if we can integrate Carlos' changes into this somehow

We got some valid questions about extensions from some people, so adding here a clarification of why we built the extension system / what are they intended for.

TLDR: Extensions should be used as starter templates / examples, not as a "final product" (for that you would just create a new SE-2 project and make it forkable).

The original Scaffold-ETH repo had hundreds of branches with a lot of examples. It was great because you could learn a bunch of different topics by cloning any given branch and tinkering with it. The problem: branches became obsolete really quickly (main was getting updates every week, but branches weren't getting the updates, and doing so would be a lot of work)

Enter SE-2 extensions ⚙️

To solve this issue on the new SE-2, we built the extension system. Extensions just hold the "extra" code that you need for your example (e.g. a contract + new UI page) and they get added to the last version of SE-2 when creating a new project with npx.

We tinker with different approaches, the main discussed thing being the balance between providing a lot of guardrails VS unlimited flexibility (replacing files, etc). The balance we found the most compelling was a mix of both:

  • Allow adding new dependencies/scripts (package.json)
  • Allow modifying certain core files (templates). (We might want to add more template files)
  • Allow adding any new file.- Don't allow replacing any core file

We feel that this is a good balance that helps with extension maintainability and safety. But we are still open to ideas, and this hackathon will help to shape the next steps.

Hope this helps, and let us know if you have any questions! 👾

Also, throwing out some extension ideas here:

  • ERC721 / ERC1155: Contract with good comments and some custom logic + frontend page with: some links / explanation + mint button + listing all minted NFT + current balance/NFTs for the connected address
  • Chainlink: Contract/s that interact with Chainlink + UI to explain it / interact with the custom contracts (check https://speedrun-chainlink.vercel.app/ for inspiration)
  • Pop-up store: An extension that makes it easy for people to set up their own store and accept crypto payments (QR code with the receiver address - could be a contract -). No need to go fancy, just a demo with all the parts working end-to-end
    - Multi-signature Wallet: Smart contract / backend / UI to empower a simple multisig.
  • Voting tool: onchain / offchain / quadratic voting
  • Token Gating Access Control example

I think extensions shouldn't be super opinionated (like a final product), just a starting point/example for people to use.

Extensions that make it to the SE-2 curated list get extra points!

Copy link
Collaborator

@technophile-04 technophile-04 left a comment

Choose a reason for hiding this comment

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

Tysm Eda!! This is looking great! Just added a couple of comments but lets see what have others have to say too 🙌

Copy link
Member

@rin-st rin-st left a comment

Choose a reason for hiding this comment

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

Thank you @edakturk14 ! Looking great to me! Added two small nitpicks

docs/extensions/createExtensions.md Outdated Show resolved Hide resolved
docs/extensions/createExtensions.md Outdated Show resolved Hide resolved
@edakturk14
Copy link
Collaborator Author

These are great @portdeveloper, @technophile-04, @rin-st - thank you so much!!

I've made the changes and a few more edits. Lmk what you think.

Open question -- should we add some of the examples for extensions which people can develop (eg: ERC721 / ERC1155) -- as in the comment from carlos which port mentioned above.

Here is how it could look like: (it could go in the 3rd party extensions section)


Extension Ideas

Here are some potential extension ideas you could explore:

  • ERC721 / ERC1155 NFT implementation
  • Chainlink integration
  • Multi-signature wallet
  • Voting tools (on-chain, off-chain, or quadratic)
  • Token gating access control

Copy link
Collaborator

@Pabl0cks Pabl0cks left a comment

Choose a reason for hiding this comment

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

Really nice job putting this together @edakturk14 !! ✨

Just checked the latest version and left some comments, mostly nitpicks that can be ignored if you don't feel them necessary 🙏

@edakturk14
Copy link
Collaborator Author

perfect, @Pabl0cks thank you!! added the changes!

Copy link
Collaborator

@Pabl0cks Pabl0cks left a comment

Choose a reason for hiding this comment

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

Thanks for all the quick updates Eda!! Looks good to me 🙌

We can always iterate if people finds something confusing.

should we add some of the examples for extensions which people can develop (eg: ERC721 / ERC1155) -- as in the comment from carlos which port mentioned above.

I don't have a strong opinion there, it's already in the hackathon FAQ and pinned in TG, maybe is not needed here, but wouldn't hurt either (at least while hackathon submission period is open?). If we decide to add it, could always go in a different PR

Copy link
Collaborator

@technophile-04 technophile-04 left a comment

Choose a reason for hiding this comment

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

Tysm Eda!! Looking great!

@technophile-04 technophile-04 merged commit 28af4d8 into main Aug 27, 2024
3 checks passed
@technophile-04 technophile-04 deleted the extensions branch August 27, 2024 01:44
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.

5 participants