Skip to content

Commit

Permalink
Stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
casey committed Oct 15, 2023
1 parent 9d3fd80 commit 18aebf1
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/subcommand/wallet/etch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,20 @@ use {super::*, bitcoin::blockdata::locktime::absolute::LockTime};
// - return change to change_address
// - allow specifying symbol
// - test everything
//
// what do degens need to play?
// - etch
// - transfer
// - show balances

#[derive(Debug, Parser)]
pub(crate) struct Etch {
address: Address<NetworkUnchecked>,
divisibility: u8,
rune: Rune,
fee_rate: FeeRate,
supply: u128,
address: Address<NetworkUnchecked>,
postage: Option<Amount>,
rune: Rune,
supply: u128,
}

#[derive(Serialize, Deserialize)]
Expand All @@ -40,6 +45,10 @@ impl Etch {

let count = client.get_block_count()?;

if index.rune(self.rune)?.is_some() {
bail!("rune `{}` has already been etched", self.rune);
}

let minimum_at_height = Rune::minimum_at_height(Height(count + 1));

if self.rune < minimum_at_height {
Expand Down

0 comments on commit 18aebf1

Please sign in to comment.