Skip to content
Open
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
17 changes: 14 additions & 3 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ members = [
"packages/macros",
"packages/test-utils/*",
"packages/tokens",
"packages/sdk",
]
exclude = ["examples/upgradeable/testdata"]

Expand Down Expand Up @@ -53,6 +54,7 @@ stellar-contract-utils = { path = "packages/contract-utils" }
stellar-event-assertion = { path = "packages/test-utils/event-assertion" }
stellar-tokens = { path = "packages/tokens" }
stellar-macros = { path = "packages/macros" }
stellar-oz-sdk = { path = "packages/sdk" }

[profile.release]
opt-level = "z"
Expand Down
4 changes: 1 addition & 3 deletions examples/fungible-allowlist/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ doctest = false

[dependencies]
soroban-sdk = { workspace = true }
stellar-macros = { workspace = true }
stellar-tokens = { workspace = true }
stellar-access = { workspace = true }
stellar-oz-sdk = { workspace = true }

[dev-dependencies]
soroban-sdk = { workspace = true, features = ["testutils"] }
13 changes: 7 additions & 6 deletions examples/fungible-allowlist/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
//! accounts.

use soroban_sdk::{contract, contractimpl, symbol_short, Address, Env, String};
use stellar_access::{AccessControl, AccessController};
use stellar_macros::only_role;
use stellar_tokens::fungible::{
allowlist::{AllowList, FungibleAllowList},
burnable::FungibleBurnable,
FungibleToken,
use stellar_oz_sdk::{
access::{only_role, AccessControl, AccessController},
tokens::fungible::{
allowlist::{AllowList, FungibleAllowList},
burnable::FungibleBurnable,
FungibleToken,
},
};

#[contract]
Expand Down
25 changes: 25 additions & 0 deletions packages/sdk/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[package]
name = "stellar-oz-sdk"
edition.workspace = true
license.workspace = true
repository.workspace = true
publish = true
version.workspace = true
description = "Fungible and NonFungible Tokens for the Stellar contracts."

[lib]
crate-type = ["lib", "cdylib"]
doctest = false

[dependencies]
soroban-sdk = { workspace = true }
stellar-access = { workspace = true }
stellar-contract-utils = { workspace = true }
stellar-tokens = { workspace = true }
stellar-macros = { workspace = true }


[dev-dependencies]
soroban-sdk = { workspace = true, features = ["testutils"] }
soroban-test-helpers = { workspace = true }
stellar-event-assertion = { workspace = true }
1 change: 1 addition & 0 deletions packages/sdk/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Open Zeppelin Stellar SDK
32 changes: 32 additions & 0 deletions packages/sdk/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#![no_std]

pub mod tokens {
pub use stellar_tokens::*;
}

pub mod ownable {
pub use stellar_access::ownable::*;
pub use stellar_macros::only_owner;
}

pub mod access {
pub use stellar_access::access_control::*;
pub use stellar_macros::{has_any_role, has_role, only_admin, only_any_role, only_role};
}

pub mod crypto {
pub use stellar_contract_utils::crypto::*;
}

pub mod merkle {
pub use stellar_contract_utils::merkle_distributor::*;
}

pub mod pausable {
pub use stellar_contract_utils::pausable::*;
pub use stellar_macros::{when_not_paused, when_paused};
}

pub mod upgradeable {
pub use stellar_contract_utils::upgradeable::*;
}