Skip to content

Commit

Permalink
fix: added features and test new bin
Browse files Browse the repository at this point in the history
  • Loading branch information
EdsonAlcala committed Sep 26, 2024
1 parent 6ef58af commit e159acd
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
9 changes: 8 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ debug = false
panic = "abort"
overflow-checks = true

[features]
default = ["all"]
all = ["near", "bitcoin", "evm"]
bitcoin = ["sha2"]
evm = []
near = []

[dependencies]
rlp = "0.6.1"
hex = "0.4.3"
Expand All @@ -25,7 +32,7 @@ near-sdk = { version = "5.3.0" }
serde-big-array = "0.5.1"
bs58 = "0.5.1"
serde = "1.0"
sha2 = "0.10.8"
sha2 = { version = "0.10.8", optional = true }

[dev-dependencies]
# ethereum
Expand Down
6 changes: 5 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#[cfg(feature = "bitcoin")]
pub mod bitcoin;
pub mod constants;
#[cfg(feature = "evm")]
pub mod evm;
#[cfg(feature = "near")]
pub mod near;

pub mod constants;
pub mod transaction_builder;
pub mod types;
8 changes: 8 additions & 0 deletions src/types.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
#[cfg(feature = "bitcoin")]
use crate::bitcoin::bitcoin_transaction_builder::BitcoinTransactionBuilder;

#[cfg(feature = "evm")]
use crate::evm::evm_transaction_builder::EVMTransactionBuilder;

#[cfg(feature = "near")]
use crate::near::near_transaction_builder::NearTransactionBuilder;

#[cfg(feature = "near")]
pub type NEAR = NearTransactionBuilder;

#[cfg(feature = "evm")]
pub type EVM = EVMTransactionBuilder;

#[cfg(feature = "bitcoin")]
pub type BITCOIN = BitcoinTransactionBuilder;
Binary file modified tests/bin/bitcoind-mac
Binary file not shown.

0 comments on commit e159acd

Please sign in to comment.