inkdevhub / swanky-cli

The all-in-one developer environment for Parity pallet-contracts based smart contracts!
https://docs.astar.network/docs/build/wasm/swanky-suite/cli/
MIT License
70 stars 29 forks source link

Improved config feature #198

Closed prxgr4mm3r closed 4 months ago

prxgr4mm3r commented 5 months ago

@ipapandinas What do you think? If an account was created outside the project dir, should it be merged into this.swankyConfig from the system config when we call the command from the project dir?

ipapandinas commented 5 months ago

@prxgr4mm3r I do not think so, if it's a personal dev account you do not want to share it publicly. Here is how I see it:

When setting the default account we can check if the alias belongs to the current account list.

For example:

Scenario 1

Scenario 2

Scenario 3

prxgr4mm3r commented 5 months ago

@ipapandinas What about accounts that are stored in the system config before the project is created? Should it be stored in the local config of the new project?

ipapandinas commented 5 months ago

@prxgr4mm3r good question but I don't think so. System account are personal accounts and project accounts are shared with project contributors.

ipapandinas commented 5 months ago

@prxgr4mm3r I created this commit https://github.com/inkdevhub/swanky-cli/commit/3a70313dc7ae46c1b832b80c8cb55ab5621d34ce on another branch to explore the possibility of using a config builder. The goal is to streamline the process of updating the configuration in a safe and controlled manner. What do you think? If you agree, you can cherry pick my commit and go from there.

prxgr4mm3r commented 5 months ago

@ipapandinas I like this idea! Will work on that.