cennznet / cennznet/pact

Make contract a versioned enum

Open
#14 0 comments 0 reactions 0 assignees View on GitHub
refactor
Dominant language
Rust
Stars
5
Forks
0
PR merge metrics
No merged PRs in 30d

Description

```rust
/// A versioned wrapper for contracts
/// It proxies to the inner type
enum Contract<'a> {
V0(ContractV0<'a>)
}
```
It should implement encode + decode

where `ContractV0` is the current version
https://github.com/cennznet/pact/blob/05b2a57eba9e79ddad4da2db7f494da7701b07b5/src/compiler/mod.rs#L47

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in src/compiler/mod.rs around line 47 and read the existing ContractV0 definition and its surrounding compiler code. Check the project's existing encoding and decoding conventions, then define the versioned Contract wrapper around the current version. Done means the wrapper supports both operations while preserving the V0 contract representation.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
blockchain, compilers
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.