Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(jstzd): add bootstrap contracts to ProtocolParameterBuilder #576

Open
wants to merge 1 commit into
base: huanchengchang-jstz-149-0
Choose a base branch
from

Conversation

huancheng-trili
Copy link
Collaborator

@huancheng-trili huancheng-trili commented Sep 27, 2024

Context

Part of JSTZ-149.

JSTZ-149

Description

Adds bootstrap contracts to the base protocol parameter set.

A BootstrapContract instance has 3 fields:

pub struct BootstrapContract {
    script: serde_json::Value,
    amount_tez: u64,
    hash: Option<tezos_crypto_rs::hash::ContractKt1Hash>,
}

script is the contract code in micheline JSON format. hash is the hash of this contract to be deployed. Note that it's optional because the node will just generate one if it's not given, but it can actually be set to any valid contract hash, which might be handy when we need to know the address of a contract in advance.

Manually testing the PR

  • Generated one parameter file with the sample contract code attached and tested the file in a sandbox.
  • Unit test: add new test cases
  • Integration test: waiting for other octez client implementation

@huancheng-trili huancheng-trili changed the base branch from huanchengchang-jstz-149 to huanchengchang-jstz-149-0 September 27, 2024 12:56
Copy link

codecov bot commented Sep 27, 2024

Codecov Report

Attention: Patch coverage is 98.16514% with 2 lines in your changes missing coverage. Please review.

Project coverage is 38.26%. Comparing base (622cf9e) to head (4e6d7db).

Files with missing lines Patch % Lines
crates/jstzd/src/protocol/bootstrap.rs 97.56% 1 Missing and 1 partial ⚠️
Files with missing lines Coverage Δ
crates/jstzd/src/protocol/mod.rs 87.19% <100.00%> (+2.41%) ⬆️
crates/jstzd/src/protocol/bootstrap.rs 96.96% <97.56%> (+0.96%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 622cf9e...4e6d7db. Read the comment docs.

@huancheng-trili huancheng-trili marked this pull request as ready for review October 3, 2024 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant