Skip to content
This repository was archived by the owner on Apr 10, 2024. It is now read-only.
This repository was archived by the owner on Apr 10, 2024. It is now read-only.

Better support for testnets #27

Open
@MakMuftic

Description

@MakMuftic

Currently, we need to have a hardcoded mapping for resources on testnets for which we want to query values from APIs like coinmarketcap. The reason behind this is that price APIs are being queried with the token symbols, so we need to remap testnet token symbols to something that actually has a price.

Suggested solution

The problem with this is that currently, we have a hardcoded remap inside code. My idea would be to add an additional work mode for fee oracle. Currently, fee oracle works in two modes:

  • debug => local setup/e2e tests
    Always returns hardcoded response
  • release => devnet/testnet/mainet

After refactoring, it would have three different modes:

  • debug => local setup/e2e tests
    Always returns hardcoded response
  • test => devnet/testnet
    Same as release, just on startup fee oracle can accept additional mapping of resourceID<>symbol that would allow us to remap test tokens to some actual mainet tokens for which we can fetch price data.
  • release => mainet

Testing details

  • Manually test different modes localy
  • Add unit test for any new logic

Acceptance Criteria

  • Removed hardcoded mapping for testnet tokens
  • Working e2e tests
  • Working devnet fee oracle
  • Working testnet fee oracle

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions