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

Better support for testnets #27

Open
6 tasks
MakMuftic opened this issue Feb 9, 2023 · 0 comments
Open
6 tasks

Better support for testnets #27

MakMuftic opened this issue Feb 9, 2023 · 0 comments

Comments

@MakMuftic
Copy link
Contributor

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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant