Skip to content

Conversation

@dolled-possum
Copy link
Collaborator

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.

@dolled-possum dolled-possum requested a review from nick1udwig July 23, 2025 20:57
@dolled-possum dolled-possum linked an issue Jul 23, 2025 that may be closed by this pull request
@dolled-possum
Copy link
Collaborator Author

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.

@dolled-possum
Copy link
Collaborator Author

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).

@dolled-possum
Copy link
Collaborator Author

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.

Copy link
Member

@nick1udwig nick1udwig left a 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))
// }
//}
Copy link
Member

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

@nick1udwig
Copy link
Member

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.

While you're here fixing those, might as well add the scripts to the top-level workspace as well!

dolled-possum and others added 3 commits August 9, 2025 10:33
alphabetical order in Cargo.toml
adding new packages to top level workspace members
removing old commented code
@dolled-possum dolled-possum merged commit 00f062b into develop Aug 9, 2025
@dolled-possum dolled-possum deleted the dw/prov-mgmt-scripts branch August 9, 2025 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants