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

docs recipe #60 #67

Conversation

suhas-sensei
Copy link
Contributor

@suhas-sensei suhas-sensei commented Dec 17, 2024

Docs recipe for "Developing on a fork“

Fixes #60

Types of change

  • Bug
  • Enhancement
  • Docs

Added new recipe documentation that outlines how to:

  • Run and interact with a mainnet fork
  • Deploy contracts to forked network
  • Configure scaffold for fork network
  • Test with both burner and external wallets (Argent/Braavos))

Copy link
Collaborator

@metalboyrick metalboyrick left a comment

Choose a reason for hiding this comment

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

looks good to me ! Thanks for the detailed explanation, will chime in @0xquantum3labs for review

docs/recipes/DevelopingOnFork.md Outdated Show resolved Hide resolved
docs/recipes/DevelopingOnFork.md Outdated Show resolved Hide resolved
docs/recipes/DevelopingOnFork.md Outdated Show resolved Hide resolved
docs/recipes/DevelopingOnFork.md Outdated Show resolved Hide resolved
docs/recipes/DevelopingOnFork.md Outdated Show resolved Hide resolved
docs/recipes/DevelopingOnFork.md Outdated Show resolved Hide resolved
docs/recipes/DevelopingOnFork.md Outdated Show resolved Hide resolved
docs/recipes/DevelopingOnFork.md Show resolved Hide resolved
@jrcarlos2000
Copy link
Contributor

after this is updated i will leave it to @Nadai2010 to take a look and see if this works out of the box from a fresh clone 😄

@suhas-sensei
Copy link
Contributor Author

on it ser

Copy link
Collaborator

@Nadai2010 Nadai2010 left a comment

Choose a reason for hiding this comment

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

Hi @suhas-sensei, thank you for your contributions!

I agree with @jrcarlos2000's review. The added code can be somewhat confusing, and for the specific contract, some parameters seem to be missing. For example, the set_greeting method appears to lack the amount parameter. Additionally, it would be beneficial to add documentation clarifying the changes, such as correctly configuring the chain from SupportedChain using mainnetFork in the scaffold.config file. Otherwise, it can lead to network failures, even if the data retrieval is technically correct.

The screenshots below highlight the issues:

  1. imagen
  2. imagen

Once these changes are addressed, we will review again. Thanks for your efforts and input!

@suhas-sensei
Copy link
Contributor Author

yeah, i'll look into the requested changes, thanks for the review.

@0xquantum3labs
Copy link
Contributor

hello @suhas-sensei , any updates on this PR ? Thanks ! 🤝

@suhas-sensei
Copy link
Contributor Author

suhas-sensei commented Dec 21, 2024

yes, I'm sending an update today

@metalboyrick
Copy link
Collaborator

gm @suhas-sensei how is it going? just wanted to remind you that the OD hack is ending soon

@suhas-sensei
Copy link
Contributor Author

yes im really sorry for the delay, sending in a couple of hours.

@suhas-sensei
Copy link
Contributor Author

Tested out the wallet connections but being honest, couldn't try testing the contract being deployed as I didn't have enough experience with Scaffold-Stark. With what I learned in the past 3 days, I worked up a recipe that ensures wallet connections work on the forked chain, as shown in the screenshots. Thank you for giving me this great learning opportunity!

docs/recipes/DevelopingOnFork.md Outdated Show resolved Hide resolved
@suhas-sensei
Copy link
Contributor Author

have a look ser @metalboyrick

Copy link
Collaborator

@Nadai2010 Nadai2010 left a comment

Choose a reason for hiding this comment

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

Hi thanks for the new isFork contribution @suhas-sensei

In point 2, I see that you add update in the scaffold.config with const mainnetFork, you must simply import from ‘supportedChain.ts’ this file is the one that controls that you can automate the network in [chains.maiinetFork], here is a sample

imagen

@suhas-sensei
Copy link
Contributor Author

ah guess im bad at refactoring, just a sec

@Nadai2010
Copy link
Collaborator

Nadai2010 commented Dec 23, 2024

Thank you @suhas-sensei can also indicate that in the .env.example you should create a .env you should add the url provider of the devnet in this particular case,

NEXT_PUBLIC_PROVIDER_URL=http://127.0.0.1:5050

Otherwise it will give an error in the data when connecting to the rpc from the wrong network.

Captura desde 2024-12-23 19-12-11

imagen

Copy link
Collaborator

@Nadai2010 Nadai2010 left a comment

Choose a reason for hiding this comment

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

All good for me, thank you

Copy link
Collaborator

@metalboyrick metalboyrick left a comment

Choose a reason for hiding this comment

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

lgtm

@metalboyrick metalboyrick merged commit e29ac0c into Scaffold-Stark:main Dec 24, 2024
1 check passed
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.

[DOCS] Add docs recipe for "Developing on a fork“
5 participants