Skip to content

Commit

Permalink
feat(interchain-token-service): library export (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
AttissNgo authored Jan 3, 2025
1 parent 8eba319 commit 7adc13d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions contracts/interchain-token-service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ alloy-sol-types = { workspace = true }
axelar-gas-service = { workspace = true, features = ["library"] }
axelar-gateway = { workspace = true, features = ["library"] }
axelar-soroban-std = { workspace = true }
cfg-if = { workspace = true }
interchain-token = { workspace = true, features = ["library"] }
soroban-sdk = { workspace = true, features = ["alloc"] }
soroban-token-sdk = { workspace = true }
Expand All @@ -30,6 +31,7 @@ interchain-token-service = { workspace = true, features = ["testutils"] }
soroban-sdk = { workspace = true, features = ["testutils", "alloc"] }

[features]
library = []
testutils = ["axelar-soroban-std/testutils"]

[lints]
Expand Down
21 changes: 14 additions & 7 deletions contracts/interchain-token-service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,22 @@

#[cfg(any(test, feature = "testutils"))]
extern crate std;
mod abi;
mod contract;

pub mod error;
pub mod event;
pub mod executable;
mod interface;
mod storage_types;
mod token_handler;
pub mod types;

pub mod executable;
cfg_if::cfg_if! {
if #[cfg(all(feature = "library", not(feature = "testutils")))] {
pub use interface::{InterchainTokenServiceClient, InterchainTokenServiceInterface};
} else {
mod abi;
pub mod event;
mod storage_types;
mod token_handler;
mod contract;

pub use contract::{InterchainTokenService, InterchainTokenServiceClient};
pub use contract::{InterchainTokenService, InterchainTokenServiceClient};
}
}

0 comments on commit 7adc13d

Please sign in to comment.