tezos-checker / checker

An in-development "robocoin" system for the Tezos blockchain
25 stars 16 forks source link

Single source of truth for token metadata #291

Closed gkaracha closed 2 years ago

gkaracha commented 2 years ago

In principle, all configuration should come from checker.yaml. Currently we have a mix of hard-wired and configurable information, which can easily get out of sync. Taken from https://github.com/tezos-checker/checker/pull/290#issuecomment-964113677:

Also, while developing this I came across some issues due to the way we currently deal with a couple token ids:

  • tokens.collateral.token_id (in checker.yaml) and TezWrapper.tez_token_id must be the same when collateral = TEZ.
  • tokens.cfmm_token.token_id (in checker.yaml) and Wctez.wctez_token_id must be the same when collateral = TEZ. Currently TezWrapper.tez_token_id and Wctez.wctez_token_id are set manually which is a problem (when they get out of sync Checker gets into an inconsistent state and the e2e tests fail).

Let's have all token information come from checker.yaml, even for those tokens that are conditionally generated (both wctez and tezWrapper are needed when collateral = TEZ, which is the only case at the moment).

gkaracha commented 2 years ago

mockFA2 (#288) might also fall into this category, even if it is to be used only for testing purposes.

gkaracha commented 2 years ago

After having another look at this issue I think we need the following to be able to close the issue: