Skip to content

Commit

Permalink
feat(cli): complete gen-zerostate subcommand
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexagon committed Apr 25, 2024
1 parent f53b510 commit ea4582d
Show file tree
Hide file tree
Showing 7 changed files with 405 additions and 119 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ perf.data*
.DS_Store

zerostate.json
zerostate.boc
22 changes: 18 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ clap = { version = "4.5.3", features = ["derive"] }
crc = "3.0.1"
dashmap = "5.4"
ed25519 = "2.0"
everscale-crypto = { version = "0.2", features = ["tl-proto"] }
everscale-crypto = { version = "0.2", features = ["tl-proto", "serde"] }
everscale-types = "0.1.0-rc.6"
exponential-backoff = "1"
fdlimit = "0.3.0"
Expand All @@ -64,6 +64,7 @@ rustls = { version = "0.21", features = ["dangerous_configuration"] }
rustls-webpki = "0.101"
serde = "1.0"
serde_json = "1.0.114"
serde_path_to_error = "0.1"
sha2 = "0.10.8"
smallvec = "1.13.1"
socket2 = "0.5"
Expand Down
3 changes: 3 additions & 0 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ everscale-types = { workspace = true }
hex = { workspace = true }
rand = { workspace = true }
serde = { workspace = true }
serde_path_to_error = { workspace = true }
serde_json = { workspace = true, features = ["preserve_order"] }
sha2 = { workspace = true }
thiserror = { workspace = true }
tikv-jemallocator = { workspace = true, features = [
"unprefixed_malloc_on_supported_platforms",
"background_threads",
Expand Down
4 changes: 2 additions & 2 deletions cli/src/tools/gen_account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ impl MultisigBuilder {
let mut data = CellBuilder::new();

// Write headers
data.store_u256(HashBytes::wrap(self.pubkey.as_bytes()))?;
data.store_u256(&self.pubkey)?;
data.store_u64(0)?; // time
data.store_bit_one()?; // constructor flag

Expand Down Expand Up @@ -368,7 +368,7 @@ impl GiverBuilder {
let mut data = CellBuilder::new();

// Append pubkey first
data.store_u256(HashBytes::wrap(self.pubkey.as_bytes()))?;
data.store_u256(&self.pubkey)?;

// Append everything except the pubkey
let prev_data = state_init
Expand Down
Loading

0 comments on commit ea4582d

Please sign in to comment.