marigold-dev / marigold-dev/chusai

Versioning the wallet_sc

Open
#7 2 comments 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

before-origination
Dominant language
OCaml
Stars
6
Forks
1
PR merge metrics
No merged PRs in 30d

Description

The deployed smart contract should have a clear version that links it to the source code from which it was compiled.

The TZIP-16 (https://tzip.tezosagora.org/proposal/tzip-16) describes a mechanism for adding metadata information to a deployed contract.

TLDR:
We need to do the following
- add a field name `metadata : (string, bytes) big_map` in the contract storage
- in the initial storage of the contract we need to fill the metadata map with an entry (key = "", value=""), where the `url-of-metadata-json` should be UTF-8 encoded

The accepted URLs are IPFS or HTTP/S+SHA256.

The metadata Json should look like this:
```
{
"name": "Chusai Wallet",
"description": "Contract to demo the interaction with Chusai optimistic rollup",
"homepage": "https://github.com/marigold-dev/chusai",
"authors": [
"https://github.com/orgs/marigold-dev/teams/chusai"
],
"interfaces": [
"TZIP-16"
],
"license": { "name": "@@LICENSE@@" },
"version": "@@VERSION@@",
"source": {
"tools": ["CamLIGO @@LIGO_VERSION@@"],
"location": " https://github.com/marigold/chusai/commit/@@COMMIT_HASH@@"
}
}
```

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.