Skip to content

Provide a default list of network configs for developers to use #95

@LuqiPan

Description

@LuqiPan

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 consts 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions