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

Test CLI store program command no longer defaults to the barebones program #860

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ At the moment this project **does not** adhere to
### Added
- Add a way to change program modification account ([#843](https://github.com/entropyxyz/entropy-core/pull/843))

### Changed

- Test-cli store program command no longer defaults to the barebones program ([#860](https://github.com/entropyxyz/entropy-core/pull/860))

## [0.1.0](https://github.com/entropyxyz/entropy-core/compare/release/v0.0.12...release/v0.1.0) - 2024-05-20

This is the first publicly available version of Entropy 🥳
Expand Down
1 change: 0 additions & 1 deletion Cargo.lock

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

23 changes: 11 additions & 12 deletions crates/test-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@ repository ='https://github.com/entropyxyz/entropy-core'
edition ='2021'

[dependencies]
entropy-testing-utils={ version="0.1.0", path="../testing-utils" }
entropy-client ={ version="0.1.0", path="../client" }
clap ={ version="4.4.6", features=["derive"] }
colored ="2.0.4"
subxt ="0.35.3"
sp-core ="31.0.0"
anyhow ="1.0.86"
tokio ={ version="1.16", features=["macros", "rt-multi-thread", "io-util", "process"] }
hex ="0.4.3"
bincode ="1.3.3"
x25519-dalek ="2.0.1"
sp-runtime ={ version="32.0.0", default-features=false }
entropy-client={ version="0.1.0", path="../client" }
clap ={ version="4.4.6", features=["derive"] }
colored ="2.0.4"
subxt ="0.35.3"
sp-core ="31.0.0"
anyhow ="1.0.86"
tokio ={ version="1.16", features=["macros", "rt-multi-thread", "io-util", "process"] }
hex ="0.4.3"
bincode ="1.3.3"
x25519-dalek ="2.0.1"
sp-runtime ={ version="32.0.0", default-features=false }
8 changes: 2 additions & 6 deletions crates/test-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ use entropy_client::{
update_programs, KeyParams, KeyShare, KeyVisibility, VERIFYING_KEY_LENGTH,
},
};
use entropy_testing_utils::constants::TEST_PROGRAM_WASM_BYTECODE;
use sp_core::{sr25519, DeriveJunction, Hasher, Pair};
use sp_runtime::traits::BlakeTwo256;
use subxt::{
Expand Down Expand Up @@ -133,7 +132,7 @@ enum CliCommand {
/// Optionally may be preceeded with "//", eg: "//Alice"
mnemonic: String,
/// The path to a .wasm file containing the program (defaults to a test program)
program_file: Option<PathBuf>,
program_file: PathBuf,
/// The path to a file containing the program config interface (defaults to empty)
config_interface_file: Option<PathBuf>,
/// The path to a file containing the program aux interface (defaults to empty)
Expand Down Expand Up @@ -280,10 +279,7 @@ async fn run_command() -> anyhow::Result<String> {
let keypair = <sr25519::Pair as Pair>::from_string(&mnemonic, None)?;
println!("Storing program using account: {}", keypair.public());

let program = match program_file {
Some(file_name) => fs::read(file_name)?,
None => TEST_PROGRAM_WASM_BYTECODE.to_owned(),
};
let program = fs::read(program_file)?;

let config_interface = match config_interface_file {
Some(file_name) => fs::read(file_name)?,
Expand Down