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

Feature Request: Automatic contracts and UI abi syncing #360

Open
kyhyco opened this issue Feb 12, 2024 · 6 comments
Open

Feature Request: Automatic contracts and UI abi syncing #360

kyhyco opened this issue Feb 12, 2024 · 6 comments

Comments

@kyhyco
Copy link
Contributor

kyhyco commented Feb 12, 2024

Describe the solution you'd like

Currently, it's a manual process to update abi generated from a smart contract and to copy-pasta to UI

Once a contract has been deployed, we need to update which chain and the new address as well.

There are several ways to do this... let's discuss!

Describe alternatives you've considered.

No response

@kyhyco
Copy link
Contributor Author

kyhyco commented Feb 12, 2024

cc @Sneh1999

@Zizzamia
Copy link
Contributor

There are several ways to do this... let's discuss!

Tell me more.

Was it a wagmi tool for that also we could reuse?

@Yuripetusko
Copy link
Contributor

Yes wagmi/cli can do it: https://wagmi.sh/cli/getting-started

@Sneh1999
Copy link
Contributor

Ahh yes, the wagmi/cli integration is something I started working on, I can try to add this capability as well

@kyhyco
Copy link
Contributor Author

kyhyco commented Feb 15, 2024

There are two integrations steps.

Contract Build

User runs forge build and generates a new abi. User copies the abi from contracts/out/$Name.sol/$Name.json to web/src/contract/$Name.json

This is what wagmi/cli is handle by knowing the deployed contract address.

Contract Deploy

User runs forge script ... and copies the contract address to web/src/hooks/contracts.ts

Does forge script ... outputs the deployed address somewhere?

Perhaps we want a "contract configuration file" that lives at the root of the web folder where either user inputs the address or somehow we do that for the user.

@kyhyco
Copy link
Contributor Author

kyhyco commented Feb 16, 2024

Another thing that would be cool is to deploy your own contract instance for the example apps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants