-
Notifications
You must be signed in to change notification settings - Fork 2
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
Prepare test CLI for use in Programs repo #856
Merged
+562
−523
Merged
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
4ef15f7
turn cli into lib
JesseAbram 78bc9d6
add changes to store program
JesseAbram 7f711f4
add licence header
JesseAbram efc2507
remove testing utils from cargo toml
JesseAbram 2933cdc
update menmoic handling
JesseAbram 254ce55
update readme
JesseAbram 93135ed
fix reademe mnemonic
JesseAbram a1865d4
add changelog
JesseAbram File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -179,7 +179,7 @@ pub async fn run_command( | |
std::env::var("ENTROPY_DEVNET").unwrap_or("ws://localhost:9944".to_string()) | ||
}); | ||
|
||
let passed_mnemonic = std::env::var("DEPLOYER_MNEMONIC").unwrap_or("//Alice".to_string()); | ||
let passed_mnemonic = std::env::var("DEPLOYER_MNEMONIC"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok got it this is good, i missed this before and thought |
||
|
||
let api = get_api(&endpoint_addr).await?; | ||
let rpc = get_rpc(&endpoint_addr).await?; | ||
|
@@ -189,7 +189,7 @@ pub async fn run_command( | |
let mnemonic = if let Some(mnemonic_option) = mnemonic_option { | ||
mnemonic_option | ||
} else { | ||
passed_mnemonic | ||
passed_mnemonic.expect("No mnemonic set") | ||
}; | ||
|
||
let program_keypair = <sr25519::Pair as Pair>::from_string(&mnemonic, None)?; | ||
|
@@ -236,7 +236,7 @@ pub async fn run_command( | |
let mnemonic = if let Some(mnemonic_option) = mnemonic_option { | ||
mnemonic_option | ||
} else { | ||
passed_mnemonic | ||
passed_mnemonic.unwrap_or("//Alice".to_string()) | ||
}; | ||
// If an account name is not provided, use the Alice key | ||
let user_keypair = <sr25519::Pair as Pair>::from_string(&mnemonic, None)?; | ||
|
@@ -280,7 +280,7 @@ pub async fn run_command( | |
let mnemonic = if let Some(mnemonic_option) = mnemonic_option { | ||
mnemonic_option | ||
} else { | ||
passed_mnemonic | ||
passed_mnemonic.expect("No Mnemonic set") | ||
}; | ||
let keypair = <sr25519::Pair as Pair>::from_string(&mnemonic, None)?; | ||
println!("Storing program using account: {}", keypair.public()); | ||
|
@@ -320,7 +320,7 @@ pub async fn run_command( | |
let mnemonic = if let Some(mnemonic_option) = mnemonic_option { | ||
mnemonic_option | ||
} else { | ||
passed_mnemonic | ||
passed_mnemonic.expect("No Mnemonic set") | ||
}; | ||
let program_keypair = <sr25519::Pair as Pair>::from_string(&mnemonic, None)?; | ||
println!("Program account: {}", program_keypair.public()); | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here