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

Chain Configs for the fuels CLI should be extendable off of the default one #1952

Open
Dhaiwat10 opened this issue Mar 26, 2024 · 5 comments
Labels
feat Issue is a feature

Comments

@Dhaiwat10
Copy link
Member

Dhaiwat10 commented Mar 26, 2024

Currently, if one wants to tweak a certain setting in the default chain config used by the fuels CLI, they would have to provide a whole new chain config file. They cannot just change one single setting.

There should be a way for people to create a custom chain config by extending the default one.

Incoming feedback from FuelLabs/docs-hub#203

@Dhaiwat10 Dhaiwat10 added the feat Issue is a feature label Mar 26, 2024
@arboleya
Copy link
Member

Could we generate a chainConfig.json with the scaffolded app and would that be enough to get the job done?

I haven't thought much about having the file as part of the template, but that could reduce the abstraction around everything. Especially considering it contains required configs, maybe we should consider showing it instead of hiding it.

@petertonysmith94
Copy link
Contributor

Could we generate a chainConfig.json with the scaffolded app and would that be enough to get the job done?

I haven't thought much about having the file as part of the template, but that could reduce the abstraction around everything. Especially considering it contains required configs, maybe we should consider showing it instead of hiding it.

I like this approach.

It would be good to have documentation in the README.md around:

  • Pre-existing wallets (w/ assets) on the chain.
  • Extending the chain with custom wallets.
  • Links for the chainConfig.json documentation.

@petertonysmith94
Copy link
Contributor

  • Extending the chain with custom wallets.

Would a command for adding a new wallet be helpful?

npm wallet:new
# Pushes new wallet (w/ assets) to the `chainConfig.json`
# Displays the private key for usage in the app. 

(Just a thought of a way to demonstrate the process)

@nedsalk
Copy link
Contributor

nedsalk commented Mar 28, 2024

Would a command for adding a new wallet be helpful? [...]

Seems to me that this could be a nice extension of forc-wallet, the workflow being similar to what you proposed:

forc wallet account new --chain-config ./chain-config.json 
# Pushes new wallet (w/ assets) to the `chainConfig.json`
# Displays the private key for usage in the app.
# Adds some default coins

@nedsalk
Copy link
Contributor

nedsalk commented Mar 28, 2024

I haven't thought much about having the file as part of the template, but that could reduce the abstraction around everything. Especially considering it contains required configs, maybe we should consider showing it instead of hiding it.

Makes sense.

If we decide to go the extension way instead, for reference I already implemented type-safe chain config extending in #1356 (ref 1, ref 2).

@Torres-ssf Torres-ssf added p2 and removed p2 labels Jul 23, 2024
@arboleya arboleya added the temp:notion label Sep 8, 2024 — with Linear
@arboleya arboleya added the temp-linear label Sep 8, 2024 — with Linear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Issue is a feature
Projects
None yet
Development

No branches or pull requests

5 participants