Description
What is the Problem Being Solved?
Currently, in order to use the NetworkDropdown
component, a developer would need to provide a list of network configs to the component, which can be quite a few lines of code. This would also create inconsistencies across different dapps because it is the developer's responsibility to find the rest/rpc endpoints, icon url, etc.
Ref: https://github.com/Agoric/ui-kit/tree/main/packages/react-components#network-dropdown
Description of the Design
One potential solution is to export const
s with network configs for mainnet
, emerynet
, devnet
, localchain
, etc and a default list of network configs like const defaultNetworkConfigs = [mainnet, emerynet, devnet, localchain];
And the developer would only need to do
// import statements omitted
const NetworkSelect = () => {
return <NetworkDropdown networkConfigs={defaultNetworkConfigs} />;
};
to use this component.
Security Considerations
This should help with security slightly as this repo would become the canonical place to provide network configs for all Agoric chains
Scaling Considerations
We should use load balanced DNS names, like https://main.api.agoric.net, to avoid overwhelming servers from a single validator
Test Plan
Open to any test plan