Skip to content

Commit

Permalink
Add LIB_ID_RGB to build.rs.
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptoquick committed Jul 13, 2023
1 parent 3f1fcc4 commit d6a29db
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ miniscript_crate = { package = "miniscript", version = "9.0.1", features = [
] }
nostr-sdk = "0.22.0"
once_cell = "1.17.1"
payjoin = { version = "0.7.0", features = ["sender"] }
payjoin = { version = "0.8.0", features = ["send"] }
percent-encoding = "2.2.0"
postcard = { version = "1.0.4", features = ["alloc"] }
pretty_env_logger = "0.5.0"
Expand Down
8 changes: 7 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::{collections::BTreeMap, fs};
use anyhow::Result;
use rgbstd::{
interface::{LIB_ID_RGB20, LIB_ID_RGB21, LIB_ID_RGB25},
stl::{LIB_ID_RGB_CONTRACT, LIB_ID_RGB_STD},
stl::{LIB_ID_RGB, LIB_ID_RGB_CONTRACT, LIB_ID_RGB_STD},

Check failure on line 6 in build.rs

View workflow job for this annotation

GitHub Actions / lint

error[E0432]: unresolved import `rgbstd::stl::LIB_ID_RGB` --> build.rs:6:11 | 6 | stl::{LIB_ID_RGB, LIB_ID_RGB_CONTRACT, LIB_ID_RGB_STD}, | ^^^^^^^^^^ no `LIB_ID_RGB` in `stl`

Check failure on line 6 in build.rs

View workflow job for this annotation

GitHub Actions / lint-wasm

error[E0432]: unresolved import `rgbstd::stl::LIB_ID_RGB` --> build.rs:6:11 | 6 | stl::{LIB_ID_RGB, LIB_ID_RGB_CONTRACT, LIB_ID_RGB_STD}, | ^^^^^^^^^^ no `LIB_ID_RGB` in `stl`
};
use serde::{Deserialize, Serialize};

Expand All @@ -12,6 +12,7 @@ type IdVersionMap = BTreeMap<String, String>;
#[allow(non_snake_case)]
#[derive(Deserialize, Serialize)]
struct LibIds {
LIB_ID_RGB: IdVersionMap,
LIB_ID_RGB20: IdVersionMap,
LIB_ID_RGB21: IdVersionMap,
LIB_ID_RGB25: IdVersionMap,
Expand All @@ -29,6 +30,11 @@ fn main() -> Result<()> {
let lib_ids_file = fs::read_to_string(LIB_IDS_FILE)?;
let mut lib_ids: LibIds = toml::from_str(&lib_ids_file)?;

lib_ids
.LIB_ID_RGB
.entry(LIB_ID_RGB.to_owned())
.or_insert(BMC_VERSION.to_owned());

lib_ids
.LIB_ID_RGB20
.entry(LIB_ID_RGB20.to_owned())
Expand Down

0 comments on commit d6a29db

Please sign in to comment.