JoinSEEDS / seeds-smart-contracts

Smart contracts for SEEDS - A Regenerative Civilization Building Game.
https://docs.google.com/document/d/1C4w9Ol8VGabCIcQDVPDrwcTRoJXBqhrb7VjslwQbUGU/edit#heading=h.6f4sxygso816
MIT License
20 stars 6 forks source link

Master token list: allow updates to validation schema #472

Open chuck-h opened 2 years ago

chuck-h commented 2 years ago

The tmastr.seedscontract maintains a list of tokens used in the Seeds ecosystem along with metadata such as logo image, name, etc. The contract also maintains a JSON schema on-chain which is used by several applications (including Light Wallet) to validate each token's metadata when generated or utilized.

This PR corrects an oversight which made the schema string immutable (we anticipate that maintenance and extension of the schema will be desirable).

This PR also includes a minor edit to the schema itself, specifying "uri" formats.

Re: https://github.com/JoinSEEDS/seeds_light_wallet/issues/1919 "Master Token List Schema", Author is aware that use of the JSON schema in Light Wallet is controversial but this PR is a needed fix for the existing implementation independent of possible future redesign/restructuring.

@n13

Note: there is no change to table structure so we should be able to redeploy on top of the old contract without resetting tables or repeating the init. I have tested init and setschema on local test net.