-
Notifications
You must be signed in to change notification settings - Fork 19
Dw/prov mgmt scripts #799
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
Dw/prov mgmt scripts #799
Conversation
|
In the eth module, I updated EthConfigAction::AddProvider to remove any already configured instances of that node name or URL before re-adding: This makes it consistent with how --rpc-config and --rpc work, as well as giving the terminal user an easy way to update things like auth credentials without accidentally making a second copy of the provider. However, I noticed that the weird ordering issue seems to happen with AddProvider, rather than guaranteeing that the newly added provider is first in the list. I'm creating an issue for this for me to investigate. |
|
add-provider is now split into add-node-provider and add-rpcurl-provider to better handle their different mandatory fields and optional params. Also, add-rpcurl-provider defaults to the Base chain ID (but is overridable). |
|
As I'm looking into the code structure more deeply for hypermap binding cacher, I noticed the packages list in the top level Cargo.toml, where I have not yet added my scripts to the [workspace] members array. Is this essential? My scripts seem to be working without it, so I'm not sure yet what function it serves, will investigate. |
nick1udwig
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple small comments -- merge when ready.
Nice work, sorry it took so long to review! 🚀
| // Err(e) => { | ||
| // format!("Failed to parse response as JSON: {}\nRaw response: {}", e, String::from_utf8_lossy(&body)) | ||
| // } | ||
| //} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove old commented-out code
While you're here fixing those, might as well add the scripts to the top-level workspace as well! |
alphabetical order in Cargo.toml adding new packages to top level workspace members removing old commented code
Description
This PR adds three terminal scripts for managing the provider config: get-providers, add-provider, and remove-provider. They are included in terminal help and their usage guidelines are included when arguments aren't supplied. Testing is easy because you can see the results of add- or remove- by looking at the results of get-providers afterward.