Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(interchain-token-service): library export #126

Merged
merged 2 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
AttissNgo marked this conversation as resolved.
Show resolved Hide resolved
pub mod event;
mod storage_types;
mod token_handler;
mod contract;
AttissNgo marked this conversation as resolved.
Show resolved Hide resolved

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