Skip to content
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

Handle constructing ProviderConfigs for non-Cosmos chains in addChainsFromRegistry #787

Open
Tracked by #776
jtieri opened this issue Jun 8, 2022 · 1 comment
Open
Tracked by #776
Labels
C: CLI COMPONENT: Command-Line Interface T: Refactor TYPE: Refactor

Comments

@jtieri
Copy link
Member

jtieri commented Jun 8, 2022

If non-Cosmos chains will be included in the chain registry then we will need to properly handle constructing the ProviderConfig's for those chains as well inside of the call to addChainsFromRegistry

Currently we do not check what the chain type is and we just pull down the data and construct a CosmosProviderConfig

relayer/cmd/chains.go

Lines 478 to 496 in 4076e7a

pcfg := &cosmos.CosmosProviderConfig{
Key: chainConfig.Key,
ChainName: chainInfo.ChainName,
ChainID: chainConfig.ChainID,
RPCAddr: chainConfig.RPCAddr,
AccountPrefix: chainConfig.AccountPrefix,
KeyringBackend: chainConfig.KeyringBackend,
GasAdjustment: chainConfig.GasAdjustment,
GasPrices: chainConfig.GasPrices,
Debug: chainConfig.Debug,
Timeout: chainConfig.Timeout,
OutputFormat: chainConfig.OutputFormat,
SignModeStr: chainConfig.SignModeStr,
}
prov, err := pcfg.NewProvider(
a.Log.With(zap.String("provider_type", "cosmos")),
a.HomePath, a.Debug, chainInfo.ChainName,
)

@jtieri jtieri added T: Refactor TYPE: Refactor C: CLI COMPONENT: Command-Line Interface labels Jun 8, 2022
This was referenced Jun 8, 2022
@jtieri
Copy link
Member Author

jtieri commented Aug 11, 2022

I know we discussed this as a team before but is this even necessary? I forget if the chain registry will be hosting the necessary information for non-cosmos chains.

Ex: Polkadot is a generalized directory that holds information about the Polkadot relay chain but not actually any specific parachain https://github.com/cosmos/chain-registry/blob/master/_non-cosmos/polkadot/assetlist.json

cc @boojamya

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: CLI COMPONENT: Command-Line Interface T: Refactor TYPE: Refactor
Projects
None yet
Development

No branches or pull requests

1 participant