Skip to content

Smart Contracts Version Tagging

Miao ZhiCheng edited this page Sep 1, 2023 · 5 revisions

In order to maintain a large matrix of supported networks, it is important for the protocol operators to be able to inspect the git revision of the deployed contracts. Here are the relevant information available for that task.

Resolver-based Deployment Tagging

Status: Being Implemented

How it works: it is set as a deployment completion flag after each deployment workflow.

Resolver key/value schema:

  • deploymentInfo.versionString.{protocol_release_version} => 0x{02major}{02minor}{02patch}0x{git_rev_up_to_16_chars}

Comment on robustness: currently there is not work-in-progress tagging, hence it may leave the deployment info in a unreliable state. But we take conscious shortcut here by aiming for the completion of the deployment workflow diligently.

Embedded Version Tags

Status: Ideation

How it looks like: a templated version string embedded in source code (could be part of the immutable too), which can be invisible to local development, while it is enforced during the build process.

Pros: resolver-independent, and may be better for ecosystem-wide promotion. Cons: may make smart contract logic update more often than necessary.

Clone this wiki locally