tqtezos / stablecoin

Tezos stablecoin smart contract
MIT License
31 stars 13 forks source link

Move metadata into another contract #91

Closed gromakovsky closed 4 years ago

gromakovsky commented 4 years ago

Clarification and motivation

In preparation for TZIP-16 (that's currently WIP) we should extract metadata outside of our contract. So token_metadata_registry shouldn't return SELF anymore.

Acceptance criteria

  1. The stablecoin contract doesn't store metadata anymore. It stores an address of a contract that holds metadata instead.
  2. TBD: should it be possible to update that address?
  3. The repository has a simple metadata contract that only holds metadata in its storage and doesn't do anything else. I suppose we can implement it in vanilla Michelson because it's really trivial (I suppose it can always FAILWITH for example).
  4. Tests are updated to use that metadata contract.
gromakovsky commented 4 years ago

@sras tiny request: there is still this statement in the specification

Since the contract owns its token metadata the returned value of this entrypoint call will always be equal to SELF.

Can you please remove it since it's no longer correct?

sras commented 4 years ago

Can you please remove it since it's no longer correct?

@gromakovsky I have raised a PR here. It appeared that the spec also contained the following similar section, so have removed it as well.

Token metadata

Stablecoin contract MUST provide an additional metadata big_map for its tokens. This big_map MUST be annotated as %token_metadata and can be at any position within contract storage. The structure of this big_map MUST follow FA2 requirements.