Skip to content

Commit

Permalink
Merge branch 'master' into issue949
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptoni9n committed Jul 9, 2024
2 parents 38979ae + cc40344 commit 23870b9
Show file tree
Hide file tree
Showing 26 changed files with 5,856 additions and 4,033 deletions.
22 changes: 22 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ serde_json = { version = "1.0.81", features = ["preserve_order"] }
serde_with = "3.7.0"
serde_yaml = "0.9.17"
sha3 = "0.10.8"
snafu = "0.8.3"
sysinfo = "0.30.3"
tempfile = "3.2.0"
tokio = { version = "1.17.0", features = ["rt-multi-thread"] }
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,13 @@ the server and show `info`-level log messages and above:
$ RUST_LOG=info cargo run server
```

Set the `RUST_BACKTRACE` environment variable in order to turn on full rust
backtrace. For example, run the server and turn on debugging and full backtrace:

```
$ RUST_BACKTRACE=1 RUST_LOG=debug ord server
```

New Releases
------------

Expand Down
2 changes: 2 additions & 0 deletions crates/mockcore/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ pub struct TransactionTemplate<'a> {
pub inputs: &'a [(usize, usize, usize, Witness)],
pub op_return: Option<ScriptBuf>,
pub op_return_index: Option<usize>,
pub op_return_value: Option<u64>,
pub output_values: &'a [u64],
pub outputs: usize,
pub p2tr: bool,
Expand Down Expand Up @@ -180,6 +181,7 @@ impl<'a> Default for TransactionTemplate<'a> {
inputs: &[],
op_return: None,
op_return_index: None,
op_return_value: None,
output_values: &[],
outputs: 1,
p2tr: false,
Expand Down
2 changes: 1 addition & 1 deletion crates/mockcore/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ impl State {
tx.output.insert(
template.op_return_index.unwrap_or(tx.output.len()),
TxOut {
value: 0,
value: template.op_return_value.unwrap_or_default(),
script_pubkey,
},
);
Expand Down
11 changes: 8 additions & 3 deletions crates/ordinals/src/charm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ pub enum Charm {
Uncommon = 9,
Vindicated = 10,
Mythic = 11,
Burned = 12,
}

impl Charm {
pub const ALL: [Self; 12] = [
pub const ALL: [Self; 13] = [
Self::Coin,
Self::Uncommon,
Self::Rare,
Expand All @@ -30,6 +31,7 @@ impl Charm {
Self::Unbound,
Self::Lost,
Self::Vindicated,
Self::Burned,
];

fn flag(self) -> u16 {
Expand All @@ -50,18 +52,19 @@ impl Charm {

pub fn icon(self) -> &'static str {
match self {
Self::Burned => "πŸ”₯",
Self::Coin => "πŸͺ™",
Self::Cursed => "πŸ‘Ή",
Self::Epic => "πŸͺ»",
Self::Legendary => "🌝",
Self::Lost => "πŸ€”",
Self::Mythic => "πŸŽƒ",
Self::Nineball => "9️⃣",
Self::Nineball => "\u{39}\u{fe0f}\u{20e3}",
Self::Rare => "🧿",
Self::Reinscription => "♻️",
Self::Unbound => "πŸ”“",
Self::Uncommon => "🌱",
Self::Vindicated => "❀️‍πŸ”₯",
Self::Vindicated => "\u{2764}\u{fe0f}\u{200d}\u{1f525}",
}
}

Expand All @@ -79,6 +82,7 @@ impl Display for Charm {
f,
"{}",
match self {
Self::Burned => "burned",
Self::Coin => "coin",
Self::Cursed => "cursed",
Self::Epic => "epic",
Expand All @@ -101,6 +105,7 @@ impl FromStr for Charm {

fn from_str(s: &str) -> Result<Self, Self::Err> {
Ok(match s {
"burned" => Self::Burned,
"coin" => Self::Coin,
"cursed" => Self::Cursed,
"epic" => Self::Epic,
Expand Down
Loading

0 comments on commit 23870b9

Please sign in to comment.