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

generate a sample etch yaml in new env generation #3530

Merged
Merged
Changes from 3 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
21 changes: 21 additions & 0 deletions src/subcommand/env.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use crate::wallet::batch;
use {super::*, colored::Colorize, std::net::TcpListener};
raphjaph marked this conversation as resolved.
Show resolved Hide resolved

struct KillOnDrop(process::Child);
Expand Down Expand Up @@ -63,6 +64,26 @@ rpcport={bitcoind_port}
",
),
)?;
// add a sample inscription.txt with hooter in text
fs::write(absolute.join("inscription.txt"), "hooter")?;
// add a sample etch.yaml
raphjaph marked this conversation as resolved.
Show resolved Hide resolved
let yaml = serde_yaml::to_string(&batch::File {
etching: Some(batch::Etching {
divisibility: 0,
rune: "HOOOOOOOOOOOOTERS".parse::<SpacedRune>().unwrap(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
rune: "HOOOOOOOOOOOOTERS".parse::<SpacedRune>().unwrap(),
rune: "FOO".parse::<SpacedRune>().unwrap(),

supply: "1000".parse().unwrap(),
premine: "1000".parse().unwrap(),
symbol: '¢',
terms: None,
turbo: false,
}),
inscriptions: vec![batch::Entry {
file: Some("env/inscription.txt".into()),
..default()
}],
..default()
});
fs::write(absolute.join("etch.yaml"), yaml.unwrap())?;

let _bitcoind = KillOnDrop(
Command::new("bitcoind")
Expand Down
Loading