Skip to content

add cosmos.directory provider #51

@gluckzhang

Description

@gluckzhang

cosmos.directory provides super nice APIs for checking a chain's information, for example: https://chains.cosmos.directory/ and https://chains.cosmos.directory/babylon We may consider adding a provider that ultilzies these endpoints and query a chain's parameters.

Pros:

  • easier to get chain params like community tax, calculated APR, bank denom, etc.
  • we can use the RPC proxy provided by cosmos.directory
  • the config file will be further optimized, maybe something like the following:
chains:
  "BabylonMainnet":
    chain_id: bbn-1
    valoper_address: xxx
    provider:
      name: cosmos.directory

Cons:

  • this is one more dependency and we cannot guarantee that the cosmos.directory APIs always work
  • cosmos.directory only provides chains information in mainnet

As an alternative, we save the response as a static json file here: https://github.com/Firstset/tenderduty/tree/main/static and update it regularly. We only need the basic information like community_tax, calculated_apr, bank_denom, etc. which do not change frequently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions