diff --git a/.github/workflows/certora-access.yml b/.github/workflows/certora-access.yml
new file mode 100644
index 00000000..fd6e28a5
--- /dev/null
+++ b/.github/workflows/certora-access.yml
@@ -0,0 +1,50 @@
+name: Certora verification
+
+on: pull_request
+
+env:
+ CONFIGS: |
+ access_control_integrity.conf
+ access_control_invariants.conf
+ access_control_non_panics.conf
+ access_control_revoke_role_non_panic.conf
+ access_control_panics.conf
+ access_control_sanity.conf
+ ownable_integrity.conf
+ ownable_invariants.conf
+ ownable_non_panics.conf
+ ownable_panics.conf
+ ownable_sanity.conf
+
+jobs:
+ check:
+ runs-on: ubuntu-latest
+ permissions:
+ contents: read
+ statuses: write
+ pull-requests: write
+ id-token: write
+ steps:
+ - name: checkout repository
+ uses: actions/checkout@v4
+ with:
+ submodules: recursive
+ - name: Install rust
+ uses: actions-rust-lang/setup-rust-toolchain@v1
+ - name: Install just
+ uses: extractions/setup-just@v3
+ - name: Install soroban
+ run: |
+ cargo update -p cvlr-soroban
+ rustup target add wasm32-unknown-unknown
+ - name: run configs
+ uses: Certora/certora-run-action@v2
+ with:
+ ecosystem: soroban
+ configurations: ${{ env.CONFIGS }}
+ job-name: "Verified Soroban Rules"
+ certora-key: ${{ secrets.CERTORAKEY }}
+ working-directory: packages/access/confs
+ cli-release: stable
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/certora-contract-utils.yml b/.github/workflows/certora-contract-utils.yml
new file mode 100644
index 00000000..0a6f9fde
--- /dev/null
+++ b/.github/workflows/certora-contract-utils.yml
@@ -0,0 +1,49 @@
+name: Certora verification
+
+on: pull_request
+
+env:
+ CONFIGS: |
+ math_integrity.conf
+ math_non_panics.conf
+ math_panics.conf
+ math_sanity.conf
+ merkle_distributor_contract_sanity.conf
+ merkle_distributor_integrity.conf
+ pausable_integrity.conf
+ pausable_non_panics.conf
+ pausable_panics.conf
+ pausable_sanity.conf
+
+jobs:
+ check:
+ runs-on: ubuntu-latest
+ permissions:
+ contents: read
+ statuses: write
+ pull-requests: write
+ id-token: write
+ steps:
+ - name: checkout repository
+ uses: actions/checkout@v4
+ with:
+ submodules: recursive
+ - name: Install rust
+ uses: actions-rust-lang/setup-rust-toolchain@v1
+ - name: Install just
+ uses: extractions/setup-just@v3
+ - name: Install soroban
+ run: |
+ cargo update -p cvlr-soroban
+ rustup target add wasm32-unknown-unknown
+ - name: run configs
+ uses: Certora/certora-run-action@v2
+ with:
+ ecosystem: soroban
+ configurations: ${{ env.CONFIGS }}
+ job-name: "Verified Soroban Rules"
+ certora-key: ${{ secrets.CERTORAKEY }}
+ working-directory: packages/contract-utils/confs
+ cli-release: stable
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/certora-smart-accounts.yml b/.github/workflows/certora-smart-accounts.yml
new file mode 100644
index 00000000..2a50a5f7
--- /dev/null
+++ b/.github/workflows/certora-smart-accounts.yml
@@ -0,0 +1,47 @@
+name: Certora verification
+
+on: pull_request
+
+env:
+ CONFIGS: |
+ simple_threshold_integrity.conf
+ simple_threshold_non_panics.conf
+ simple_threshold_panics.conf
+ simple_threshold_contract_sanity.conf
+ weighted_threshold_integrity.conf
+ weighted_threshold_contract_sanity.conf
+ spending_limit_integrity.conf
+ spending_limit_contract_sanity.conf
+
+jobs:
+ check:
+ runs-on: ubuntu-latest
+ permissions:
+ contents: read
+ statuses: write
+ pull-requests: write
+ id-token: write
+ steps:
+ - name: checkout repository
+ uses: actions/checkout@v4
+ with:
+ submodules: recursive
+ - name: Install rust
+ uses: actions-rust-lang/setup-rust-toolchain@v1
+ - name: Install just
+ uses: extractions/setup-just@v3
+ - name: Install soroban
+ run: |
+ cargo update -p cvlr-soroban
+ rustup target add wasm32-unknown-unknown
+ - name: run configs
+ uses: Certora/certora-run-action@v2
+ with:
+ ecosystem: soroban
+ configurations: ${{ env.CONFIGS }}
+ job-name: "Verified Soroban Rules"
+ certora-key: ${{ secrets.CERTORAKEY }}
+ working-directory: packages/accounts/confs
+ cli-release: stable
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/certora-token.yml b/.github/workflows/certora-token.yml
new file mode 100644
index 00000000..3ca7e606
--- /dev/null
+++ b/.github/workflows/certora-token.yml
@@ -0,0 +1,53 @@
+name: Certora verification
+
+on: pull_request
+
+env:
+ CONFIGS: |
+ fungible_integrity.conf
+ fungible_invariants.conf
+ fungible_non_panics.conf
+ fungible_panics.conf
+ fungible_sanity.conf
+ allowlist.conf
+ blocklist.conf
+ burnable.conf
+ burnable_nft_sanity.conf
+ capped.conf
+ consecutive_nft_sanity.conf
+ enumerable_nft_sanity.conf
+ royalties_nft_sanity.conf
+ vault_sanity.conf
+
+jobs:
+ check:
+ runs-on: ubuntu-latest
+ permissions:
+ contents: read
+ statuses: write
+ pull-requests: write
+ id-token: write
+ steps:
+ - name: checkout repository
+ uses: actions/checkout@v4
+ with:
+ submodules: recursive
+ - name: Install rust
+ uses: actions-rust-lang/setup-rust-toolchain@v1
+ - name: Install just
+ uses: extractions/setup-just@v3
+ - name: Install soroban
+ run: |
+ cargo update -p cvlr-soroban
+ rustup target add wasm32-unknown-unknown
+ - name: run configs
+ uses: Certora/certora-run-action@9596198c77a3f33d22c59226ff7757185a504f8f
+ with:
+ ecosystem: soroban
+ configurations: ${{ env.CONFIGS }}
+ job-name: "Verified Soroban Rules"
+ certora-key: ${{ secrets.CERTORAKEY }}
+ working-directory: packages/tokens/confs
+ cli-release: stable
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.gitignore b/.gitignore
index b20111cd..4b8de65f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,11 +1,15 @@
# certora
.certora_internal
+emv-*
+local.conf
+*.wat
**/target/
/.idea
.DS_Store
.thumbs.db
.vscode
+.cursorrules
# These are backup files generated by rustfmt
**/*.rs.bk
@@ -19,10 +23,6 @@ ENV/
env.bak/
venv.bak/
-# Documentation
-docs/node_modules
-docs/build
-
# Code Coverage
htmlcov/
lcov.info
diff --git a/Architecture.md b/Architecture.md
index cd2e5504..743383b7 100644
--- a/Architecture.md
+++ b/Architecture.md
@@ -26,7 +26,6 @@ stellar-contracts/
│ │ └── non_fungible/ # Non-fungible token implementation
│ └── lib.rs
├── examples/ # Example contract implementations
-├── docs/ # Documentation
└── audits/ # Security audit reports
```
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 604e2df2..92510805 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -47,11 +47,14 @@ As a contributor, you are expected to fork this repository, work on your own for
# run tests
cargo test
+ # build
+ cargo build --target wasm32v1-none --release
+
# run linter
cargo clippy --all-targets --all-features -- -D warnings
# run formatter
- cargo fmt --all -- --check
+ cargo +nightly fmt --all -- --check
# run documentation checks
cargo doc --all --no-deps
diff --git a/Cargo.lock b/Cargo.lock
index f8371c45..033c1de0 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -162,6 +162,12 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf"
+[[package]]
+name = "base64"
+version = "0.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
+
[[package]]
name = "base64"
version = "0.22.1"
@@ -170,9 +176,9 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
[[package]]
name = "base64ct"
-version = "1.8.0"
+version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba"
+checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b"
[[package]]
name = "bit-set"
@@ -191,9 +197,9 @@ checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7"
[[package]]
name = "bitflags"
-version = "2.9.4"
+version = "2.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394"
+checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3"
[[package]]
name = "block-buffer"
@@ -219,14 +225,14 @@ dependencies = [
"num-bigint",
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.110",
]
[[package]]
name = "cc"
-version = "1.2.36"
+version = "1.2.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5252b3d2648e5eedbc1a6f501e3c795e07025c1e93bbf8bbdd6eef7f447a6d54"
+checksum = "35900b6c8d709fb1d854671ae27aeaa9eec2f8b01b364e1619a40da3e6fe2afe"
dependencies = [
"find-msvc-tools",
"shlex",
@@ -234,20 +240,9 @@ dependencies = [
[[package]]
name = "cfg-if"
-version = "1.0.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9"
-
-[[package]]
-name = "cfg_eval"
-version = "0.1.2"
+version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "45565fc9416b9896014f5732ac776f810ee53a66730c17e4020c3ec064a8f88f"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.106",
-]
+checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
[[package]]
name = "chrono"
@@ -258,7 +253,7 @@ dependencies = [
"iana-time-zone",
"num-traits",
"serde",
- "windows-link 0.2.0",
+ "windows-link",
]
[[package]]
@@ -317,20 +312,14 @@ dependencies = [
[[package]]
name = "ctor"
-version = "0.5.0"
+version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "67773048316103656a637612c4a62477603b777d91d9c62ff2290f9cde178fdb"
+checksum = "32a2785755761f3ddc1492979ce1e48d2c00d09311c39e4466429188f3dd6501"
dependencies = [
- "ctor-proc-macro",
- "dtor",
+ "quote",
+ "syn 2.0.110",
]
-[[package]]
-name = "ctor-proc-macro"
-version = "0.0.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2931af7e13dc045d8e9d26afccc6fa115d64e115c9c84b1166288b46f6782c2"
-
[[package]]
name = "curve25519-dalek"
version = "4.1.3"
@@ -355,7 +344,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.110",
]
[[package]]
@@ -387,7 +376,7 @@ checksum = "7c12f059e98caf58c289f08da48eeef11f2549afdf0fd7d3f3c9a08039040500"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.110",
]
[[package]]
@@ -397,7 +386,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc2d32c7536052a4b72c27d2dce9a83b6ada5dd98756b850e6a1540fe80eabd7"
dependencies = [
"quote",
- "syn 2.0.106",
+ "syn 2.0.110",
]
[[package]]
@@ -415,10 +404,10 @@ version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2ddb1aab9e865d13f5b97d5eb3b8417457543b725e9d95febb8bcd9e124a4414"
dependencies = [
- "darling",
+ "darling 0.20.11",
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.110",
]
[[package]]
@@ -443,7 +432,7 @@ dependencies = [
[[package]]
name = "cvlr-soroban"
version = "0.4.0"
-source = "git+https://github.com/Certora/cvlr-soroban.git#7b221cd8441b215c2a5ece04346691f15d29b7b6"
+source = "git+https://github.com/chandrakananandi/cvlr-soroban.git?branch=soroban-22.0.8#0edff4c27b94729ab8ba5bf57cf3faff5e007062"
dependencies = [
"cvlr-asserts",
"cvlr-log",
@@ -454,19 +443,19 @@ dependencies = [
[[package]]
name = "cvlr-soroban-derive"
version = "0.4.0"
-source = "git+https://github.com/Certora/cvlr-soroban.git#7b221cd8441b215c2a5ece04346691f15d29b7b6"
+source = "git+https://github.com/chandrakananandi/cvlr-soroban.git?branch=soroban-22.0.8#0edff4c27b94729ab8ba5bf57cf3faff5e007062"
dependencies = [
- "darling",
+ "darling 0.20.11",
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.110",
"uuid",
]
[[package]]
name = "cvlr-soroban-macros"
version = "0.4.0"
-source = "git+https://github.com/Certora/cvlr-soroban.git#7b221cd8441b215c2a5ece04346691f15d29b7b6"
+source = "git+https://github.com/chandrakananandi/cvlr-soroban.git?branch=soroban-22.0.8#0edff4c27b94729ab8ba5bf57cf3faff5e007062"
[[package]]
name = "darling"
@@ -474,8 +463,18 @@ version = "0.20.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee"
dependencies = [
- "darling_core",
- "darling_macro",
+ "darling_core 0.20.11",
+ "darling_macro 0.20.11",
+]
+
+[[package]]
+name = "darling"
+version = "0.21.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0"
+dependencies = [
+ "darling_core 0.21.3",
+ "darling_macro 0.21.3",
]
[[package]]
@@ -489,7 +488,21 @@ dependencies = [
"proc-macro2",
"quote",
"strsim",
- "syn 2.0.106",
+ "syn 2.0.110",
+]
+
+[[package]]
+name = "darling_core"
+version = "0.21.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1247195ecd7e3c85f83c8d2a366e4210d588e802133e1e355180a9870b517ea4"
+dependencies = [
+ "fnv",
+ "ident_case",
+ "proc-macro2",
+ "quote",
+ "strsim",
+ "syn 2.0.110",
]
[[package]]
@@ -498,9 +511,20 @@ version = "0.20.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead"
dependencies = [
- "darling_core",
+ "darling_core 0.20.11",
"quote",
- "syn 2.0.106",
+ "syn 2.0.110",
+]
+
+[[package]]
+name = "darling_macro"
+version = "0.21.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81"
+dependencies = [
+ "darling_core 0.21.3",
+ "quote",
+ "syn 2.0.110",
]
[[package]]
@@ -522,12 +546,12 @@ dependencies = [
[[package]]
name = "deranged"
-version = "0.5.3"
+version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d630bccd429a5bb5a64b5e94f693bfc48c9f8566418fda4c494cc94f911f87cc"
+checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587"
dependencies = [
"powerfmt",
- "serde",
+ "serde_core",
]
[[package]]
@@ -549,7 +573,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.110",
]
[[package]]
@@ -570,21 +594,6 @@ version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2"
-[[package]]
-name = "dtor"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e58a0764cddb55ab28955347b45be00ade43d4d6f3ba4bf3dc354e4ec9432934"
-dependencies = [
- "dtor-proc-macro",
-]
-
-[[package]]
-name = "dtor-proc-macro"
-version = "0.0.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f678cf4a922c215c63e0de95eb1ff08a958a81d47e485cf9da1e27bf6305cfa5"
-
[[package]]
name = "dyn-clone"
version = "1.0.20"
@@ -664,9 +673,9 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
[[package]]
name = "errno"
-version = "0.3.13"
+version = "0.3.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad"
+checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
dependencies = [
"libc",
"windows-sys",
@@ -708,9 +717,9 @@ checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d"
[[package]]
name = "find-msvc-tools"
-version = "0.1.1"
+version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7fd99930f64d146689264c637b5af2f0233a933bef0d8570e2526bf9e083192d"
+checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127"
[[package]]
name = "fnv"
@@ -720,7 +729,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
[[package]]
name = "fungible-allowlist-example"
-version = "0.4.1"
+version = "0.5.1"
dependencies = [
"soroban-sdk",
"stellar-access",
@@ -730,7 +739,7 @@ dependencies = [
[[package]]
name = "fungible-blocklist-example"
-version = "0.4.1"
+version = "0.5.1"
dependencies = [
"soroban-sdk",
"stellar-access",
@@ -740,7 +749,7 @@ dependencies = [
[[package]]
name = "fungible-capped-example"
-version = "0.4.1"
+version = "0.5.1"
dependencies = [
"soroban-sdk",
"stellar-tokens",
@@ -748,9 +757,9 @@ dependencies = [
[[package]]
name = "fungible-merkle-airdrop-example"
-version = "0.4.1"
+version = "0.5.1"
dependencies = [
- "hex-literal 1.0.0",
+ "hex-literal",
"soroban-sdk",
"stellar-access",
"stellar-contract-utils",
@@ -760,7 +769,7 @@ dependencies = [
[[package]]
name = "fungible-pausable-example"
-version = "0.4.1"
+version = "0.5.1"
dependencies = [
"soroban-sdk",
"stellar-contract-utils",
@@ -770,7 +779,7 @@ dependencies = [
[[package]]
name = "fungible-vault-example"
-version = "0.4.1"
+version = "0.5.1"
dependencies = [
"soroban-sdk",
"stellar-access",
@@ -780,9 +789,9 @@ dependencies = [
[[package]]
name = "generic-array"
-version = "0.14.7"
+version = "0.14.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
+checksum = "4bb6743198531e02858aeaea5398fcc883e71851fcbcb5a2f773e2fb6cb1edf2"
dependencies = [
"typenum",
"version_check",
@@ -798,20 +807,20 @@ dependencies = [
"cfg-if",
"js-sys",
"libc",
- "wasi 0.11.1+wasi-snapshot-preview1",
+ "wasi",
"wasm-bindgen",
]
[[package]]
name = "getrandom"
-version = "0.3.3"
+version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4"
+checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
dependencies = [
"cfg-if",
"libc",
"r-efi",
- "wasi 0.14.4+wasi-0.2.4",
+ "wasip2",
]
[[package]]
@@ -842,15 +851,9 @@ dependencies = [
[[package]]
name = "hashbrown"
-version = "0.15.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1"
-
-[[package]]
-name = "heck"
-version = "0.5.0"
+version = "0.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
+checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d"
[[package]]
name = "hex"
@@ -867,12 +870,6 @@ version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46"
-[[package]]
-name = "hex-literal"
-version = "1.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bcaaec4551594c969335c98c903c1397853d4198408ea609190f420500f6be71"
-
[[package]]
name = "hmac"
version = "0.12.1"
@@ -884,9 +881,9 @@ dependencies = [
[[package]]
name = "iana-time-zone"
-version = "0.1.63"
+version = "0.1.64"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8"
+checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb"
dependencies = [
"android_system_properties",
"core-foundation-sys",
@@ -925,13 +922,14 @@ dependencies = [
[[package]]
name = "indexmap"
-version = "2.11.0"
+version = "2.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f2481980430f9f78649238835720ddccc57e52df14ffce1c6f37391d61b563e9"
+checksum = "6717a8d2a5a929a1a2eb43a12812498ed141a0bcfb7e8f7844fbdbe4303bba9f"
dependencies = [
"equivalent",
- "hashbrown 0.15.5",
+ "hashbrown 0.16.0",
"serde",
+ "serde_core",
]
[[package]]
@@ -957,9 +955,9 @@ checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
[[package]]
name = "js-sys"
-version = "0.3.78"
+version = "0.3.82"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0c0b063578492ceec17683ef2f8c5e89121fbd0b172cbc280635ab7567db2738"
+checksum = "b011eec8cc36da2aab2d5cff675ec18454fad408585853910a202391cf9f8e65"
dependencies = [
"once_cell",
"wasm-bindgen",
@@ -988,17 +986,11 @@ dependencies = [
"cpufeatures",
]
-[[package]]
-name = "lazy_static"
-version = "1.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
-
[[package]]
name = "libc"
-version = "0.2.175"
+version = "0.2.177"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543"
+checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976"
[[package]]
name = "libm"
@@ -1008,9 +1000,9 @@ checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de"
[[package]]
name = "linux-raw-sys"
-version = "0.9.4"
+version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12"
+checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039"
[[package]]
name = "log"
@@ -1018,26 +1010,15 @@ version = "0.4.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432"
-[[package]]
-name = "macro-string"
-version = "0.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b27834086c65ec3f9387b096d66e99f221cf081c2b738042aa252bcd41204e3"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.106",
-]
-
[[package]]
name = "memchr"
-version = "2.7.5"
+version = "2.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0"
+checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273"
[[package]]
name = "merkle-voting-example"
-version = "0.4.1"
+version = "0.5.1"
dependencies = [
"soroban-sdk",
"stellar-contract-utils",
@@ -1045,7 +1026,7 @@ dependencies = [
[[package]]
name = "multisig-account-example"
-version = "0.4.1"
+version = "0.5.1"
dependencies = [
"soroban-sdk",
"stellar-accounts",
@@ -1053,7 +1034,7 @@ dependencies = [
[[package]]
name = "multisig-ed25519-verifier-example"
-version = "0.4.1"
+version = "0.5.1"
dependencies = [
"soroban-sdk",
"stellar-accounts",
@@ -1061,7 +1042,7 @@ dependencies = [
[[package]]
name = "multisig-spending-limit-policy-example"
-version = "0.4.1"
+version = "0.5.1"
dependencies = [
"soroban-sdk",
"stellar-accounts",
@@ -1069,7 +1050,7 @@ dependencies = [
[[package]]
name = "multisig-threshold-policy-example"
-version = "0.4.1"
+version = "0.5.1"
dependencies = [
"soroban-sdk",
"stellar-accounts",
@@ -1077,7 +1058,7 @@ dependencies = [
[[package]]
name = "multisig-webauthn-verifier-example"
-version = "0.4.1"
+version = "0.5.1"
dependencies = [
"soroban-sdk",
"stellar-accounts",
@@ -1085,7 +1066,7 @@ dependencies = [
[[package]]
name = "nft-access-control-example"
-version = "0.4.1"
+version = "0.5.1"
dependencies = [
"soroban-sdk",
"stellar-access",
@@ -1095,7 +1076,7 @@ dependencies = [
[[package]]
name = "nft-consecutive-example"
-version = "0.4.1"
+version = "0.5.1"
dependencies = [
"soroban-sdk",
"stellar-tokens",
@@ -1103,7 +1084,7 @@ dependencies = [
[[package]]
name = "nft-enumerable-example"
-version = "0.4.1"
+version = "0.5.1"
dependencies = [
"soroban-sdk",
"stellar-macros",
@@ -1112,7 +1093,7 @@ dependencies = [
[[package]]
name = "nft-royalties-example"
-version = "0.4.1"
+version = "0.5.1"
dependencies = [
"soroban-sdk",
"stellar-access",
@@ -1122,7 +1103,7 @@ dependencies = [
[[package]]
name = "nft-sequential-minting-example"
-version = "0.4.1"
+version = "0.5.1"
dependencies = [
"soroban-sdk",
"stellar-macros",
@@ -1153,7 +1134,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.110",
]
[[package]]
@@ -1182,7 +1163,7 @@ checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
[[package]]
name = "ownable-example"
-version = "0.4.1"
+version = "0.5.1"
dependencies = [
"soroban-sdk",
"stellar-access",
@@ -1209,7 +1190,7 @@ checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
[[package]]
name = "pausable-example"
-version = "0.4.1"
+version = "0.5.1"
dependencies = [
"soroban-sdk",
"stellar-contract-utils",
@@ -1257,7 +1238,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b"
dependencies = [
"proc-macro2",
- "syn 2.0.106",
+ "syn 2.0.110",
]
[[package]]
@@ -1271,23 +1252,22 @@ dependencies = [
[[package]]
name = "proc-macro2"
-version = "1.0.101"
+version = "1.0.103"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de"
+checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8"
dependencies = [
"unicode-ident",
]
[[package]]
name = "proptest"
-version = "1.7.0"
+version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6fcdab19deb5195a31cf7726a210015ff1496ba1464fd42cb4f537b8b01b471f"
+checksum = "bee689443a2bd0a16ab0348b52ee43e3b2d1b1f931c8aa5c9f8de4c86fbe8c40"
dependencies = [
"bit-set",
"bit-vec",
"bitflags",
- "lazy_static",
"num-traits",
"rand 0.9.2",
"rand_chacha 0.9.0",
@@ -1306,9 +1286,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
[[package]]
name = "quote"
-version = "1.0.40"
+version = "1.0.42"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
+checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f"
dependencies = [
"proc-macro2",
]
@@ -1375,7 +1355,7 @@ version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38"
dependencies = [
- "getrandom 0.3.3",
+ "getrandom 0.3.4",
]
[[package]]
@@ -1389,29 +1369,29 @@ dependencies = [
[[package]]
name = "ref-cast"
-version = "1.0.24"
+version = "1.0.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4a0ae411dbe946a674d89546582cea4ba2bb8defac896622d6496f14c23ba5cf"
+checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d"
dependencies = [
"ref-cast-impl",
]
[[package]]
name = "ref-cast-impl"
-version = "1.0.24"
+version = "1.0.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1165225c21bff1f3bbce98f5a1f889949bc902d3575308cc7b0de30b4f6d27c7"
+checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.110",
]
[[package]]
name = "regex-syntax"
-version = "0.8.6"
+version = "0.8.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001"
+checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58"
[[package]]
name = "rfc6979"
@@ -1434,9 +1414,9 @@ dependencies = [
[[package]]
name = "rustix"
-version = "1.0.8"
+version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8"
+checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e"
dependencies = [
"bitflags",
"errno",
@@ -1453,9 +1433,9 @@ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
[[package]]
name = "rusty-fork"
-version = "0.3.0"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f"
+checksum = "cc6bf79ff24e648f6da1f8d1f011e9cac26491b619e6b9280f2b47f1774e6ee2"
dependencies = [
"fnv",
"quick-error",
@@ -1471,7 +1451,7 @@ checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
[[package]]
name = "sac-admin-generic-example"
-version = "0.4.1"
+version = "0.5.1"
dependencies = [
"ed25519-dalek",
"soroban-sdk",
@@ -1480,7 +1460,7 @@ dependencies = [
[[package]]
name = "sac-admin-wrapper-example"
-version = "0.4.1"
+version = "0.5.1"
dependencies = [
"soroban-sdk",
"stellar-access",
@@ -1488,17 +1468,6 @@ dependencies = [
"stellar-tokens",
]
-[[package]]
-name = "schemars"
-version = "0.8.22"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615"
-dependencies = [
- "dyn-clone",
- "serde",
- "serde_json",
-]
-
[[package]]
name = "schemars"
version = "0.9.0"
@@ -1513,9 +1482,9 @@ dependencies = [
[[package]]
name = "schemars"
-version = "1.0.4"
+version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "82d20c4491bc164fa2f6c5d44565947a52ad80b9505d8e36f8d54c27c739fcd0"
+checksum = "9558e172d4e8533736ba97870c4b2cd63f84b382a3d6eb063da41b91cce17289"
dependencies = [
"dyn-clone",
"ref-cast",
@@ -1539,16 +1508,17 @@ dependencies = [
[[package]]
name = "semver"
-version = "1.0.26"
+version = "1.0.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0"
+checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2"
[[package]]
name = "serde"
-version = "1.0.219"
+version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
+checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
dependencies = [
+ "serde_core",
"serde_derive",
]
@@ -1562,45 +1532,53 @@ dependencies = [
"serde",
]
+[[package]]
+name = "serde_core"
+version = "1.0.228"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
+dependencies = [
+ "serde_derive",
+]
+
[[package]]
name = "serde_derive"
-version = "1.0.219"
+version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
+checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.110",
]
[[package]]
name = "serde_json"
-version = "1.0.143"
+version = "1.0.145"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d401abef1d108fbd9cbaebc3e46611f4b1021f714a0597a71f41ee463f5f4a5a"
+checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c"
dependencies = [
"itoa",
"memchr",
"ryu",
"serde",
+ "serde_core",
]
[[package]]
name = "serde_with"
-version = "3.14.0"
+version = "3.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f2c45cd61fefa9db6f254525d46e392b852e0e61d9a1fd36e5bd183450a556d5"
+checksum = "aa66c845eee442168b2c8134fec70ac50dc20e760769c8ba0ad1319ca1959b04"
dependencies = [
- "base64",
+ "base64 0.22.1",
"chrono",
"hex",
"indexmap 1.9.3",
- "indexmap 2.11.0",
- "schemars 0.8.22",
+ "indexmap 2.12.0",
"schemars 0.9.0",
- "schemars 1.0.4",
- "serde",
- "serde_derive",
+ "schemars 1.1.0",
+ "serde_core",
"serde_json",
"serde_with_macros",
"time",
@@ -1608,14 +1586,14 @@ dependencies = [
[[package]]
name = "serde_with_macros"
-version = "3.14.0"
+version = "3.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "de90945e6565ce0d9a25098082ed4ee4002e047cb59892c318d66821e14bb30f"
+checksum = "b91a903660542fced4e99881aa481bdbaec1634568ee02e0b8bd57c64cb38955"
dependencies = [
- "darling",
+ "darling 0.21.3",
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.110",
]
[[package]]
@@ -1663,21 +1641,21 @@ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
[[package]]
name = "soroban-builtin-sdk-macros"
-version = "23.0.1"
+version = "22.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d9336adeabcd6f636a4e0889c8baf494658ef5a3c4e7e227569acd2ce9091e85"
+checksum = "cf2e42bf80fcdefb3aae6ff3c7101a62cf942e95320ed5b518a1705bc11c6b2f"
dependencies = [
"itertools",
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.110",
]
[[package]]
name = "soroban-env-common"
-version = "23.0.1"
+version = "22.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "00067f52e8bbf1abf0de03fe3e2fbb06910893cfbe9a7d9093d6425658833ff3"
+checksum = "027cd856171bfd6ad2c0ffb3b7dfe55ad7080fb3050c36ad20970f80da634472"
dependencies = [
"arbitrary",
"crate-git-revision",
@@ -1694,9 +1672,9 @@ dependencies = [
[[package]]
name = "soroban-env-guest"
-version = "23.0.1"
+version = "22.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ccd1e40963517b10963a8e404348d3fe6caf9c278ac47a6effd48771297374d6"
+checksum = "9a07dda1ae5220d975979b19ad4fd56bc86ec7ec1b4b25bc1c5d403f934e592e"
dependencies = [
"soroban-env-common",
"static_assertions",
@@ -1704,9 +1682,9 @@ dependencies = [
[[package]]
name = "soroban-env-host"
-version = "23.0.1"
+version = "22.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b9766c5ad78e9d8ae10afbc076301f7d610c16407a1ebb230766dbe007a48725"
+checksum = "66e8b03a4191d485eab03f066336112b2a50541a7553179553dc838b986b94dd"
dependencies = [
"ark-bls12-381",
"ark-ec",
@@ -1718,7 +1696,7 @@ dependencies = [
"elliptic-curve",
"generic-array",
"getrandom 0.2.16",
- "hex-literal 0.4.1",
+ "hex-literal",
"hmac",
"k256",
"num-derive",
@@ -1740,9 +1718,9 @@ dependencies = [
[[package]]
name = "soroban-env-macros"
-version = "23.0.1"
+version = "22.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b0e6a1c5844257ce96f5f54ef976035d5bd0ee6edefaf9f5e0bcb8ea4b34228c"
+checksum = "00eff744764ade3bc480e4909e3a581a240091f3d262acdce80b41f7069b2bd9"
dependencies = [
"itertools",
"proc-macro2",
@@ -1750,14 +1728,14 @@ dependencies = [
"serde",
"serde_json",
"stellar-xdr",
- "syn 2.0.106",
+ "syn 2.0.110",
]
[[package]]
name = "soroban-ledger-snapshot"
-version = "23.0.3"
+version = "22.0.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cdefc9240bddd3ff4d47fd4d8f8dd44784840e25a18e426c6c987db8572d6df9"
+checksum = "2826e2c9d364edbb2ea112dc861077c74557bdad0a7a00487969088c7c648169"
dependencies = [
"serde",
"serde_json",
@@ -1769,13 +1747,12 @@ dependencies = [
[[package]]
name = "soroban-sdk"
-version = "23.0.3"
+version = "22.0.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7cb0dc3eb3661962cb8833513953b5839df14d589d96f8370b5b0c3870a8b3b5"
+checksum = "c7ac27d7573e62b745513fa1be8dab7a09b9676a7f39db97164f1d458a344749"
dependencies = [
"arbitrary",
"bytes-lit",
- "crate-git-revision",
"ctor",
"derive_arbitrary",
"ed25519-dalek",
@@ -1792,31 +1769,31 @@ dependencies = [
[[package]]
name = "soroban-sdk-macros"
-version = "23.0.3"
+version = "22.0.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7eab5f4e5f3836a4b4aeecb2837160e944621b2f8dbad775638a2ab8e10fd5bb"
+checksum = "9ef0d7d62b2584696d306b8766728971c7d0731a03a5e047f1fc68722ac8cf0c"
dependencies = [
- "darling",
- "heck",
+ "crate-git-revision",
+ "darling 0.20.11",
"itertools",
- "macro-string",
"proc-macro2",
"quote",
+ "rustc_version",
"sha2",
"soroban-env-common",
"soroban-spec",
"soroban-spec-rust",
"stellar-xdr",
- "syn 2.0.106",
+ "syn 2.0.110",
]
[[package]]
name = "soroban-spec"
-version = "23.0.3"
+version = "22.0.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fd257b0365307e0b8d38040ee0364abcc610fc6e61960ff5e26803922d098921"
+checksum = "a4ad0867aec99770ed614fedbec7ac4591791df162ff9e548ab7ebd07cd23a9c"
dependencies = [
- "base64",
+ "base64 0.13.1",
"stellar-xdr",
"thiserror",
"wasmparser",
@@ -1824,9 +1801,9 @@ dependencies = [
[[package]]
name = "soroban-spec-rust"
-version = "23.0.3"
+version = "22.0.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1ec3c72de91fdcf637045f3351df029a98b9de9ad22ced4063f74d0b5873f526"
+checksum = "aebe31c042adfa2885ec47b67b08fcead8707da80a3fe737eaf2a9ae1a8cfdc3"
dependencies = [
"prettyplease",
"proc-macro2",
@@ -1834,19 +1811,19 @@ dependencies = [
"sha2",
"soroban-spec",
"stellar-xdr",
- "syn 2.0.106",
+ "syn 2.0.110",
"thiserror",
]
[[package]]
name = "soroban-test-helpers"
-version = "0.2.3"
+version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b21ea049bdfcfce7de5aa17f1a52ecab5f2bd599d40bd805747ef75b110ee5d"
+checksum = "f7d51ae9c644ccd8dd2c41148ee31a037641b1aeb85b76d519c7f6e9a4cd55b0"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.110",
]
[[package]]
@@ -1886,8 +1863,9 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
[[package]]
name = "stellar-access"
-version = "0.4.1"
+version = "0.5.1"
dependencies = [
+ "base64ct",
"cvlr",
"cvlr-soroban",
"cvlr-soroban-derive",
@@ -1899,10 +1877,15 @@ dependencies = [
[[package]]
name = "stellar-accounts"
-version = "0.4.1"
+version = "0.5.1"
dependencies = [
+ "base64ct",
+ "cvlr",
+ "cvlr-soroban",
+ "cvlr-soroban-derive",
+ "cvlr-soroban-macros",
"ed25519-dalek",
- "hex-literal 1.0.0",
+ "hex-literal",
"p256",
"serde",
"serde-json-core",
@@ -1913,21 +1896,22 @@ dependencies = [
[[package]]
name = "stellar-contract-utils"
-version = "0.4.1"
+version = "0.5.1"
dependencies = [
"cvlr",
"cvlr-soroban",
"cvlr-soroban-derive",
"cvlr-soroban-macros",
- "hex-literal 1.0.0",
+ "hex-literal",
"proptest",
"soroban-sdk",
"stellar-event-assertion",
+ "stellar-macros",
]
[[package]]
name = "stellar-default-impl-macro-test"
-version = "0.4.1"
+version = "0.5.1"
dependencies = [
"soroban-sdk",
"stellar-access",
@@ -1938,7 +1922,7 @@ dependencies = [
[[package]]
name = "stellar-event-assertion"
-version = "0.4.1"
+version = "0.5.1"
dependencies = [
"soroban-sdk",
"stellar-tokens",
@@ -1946,27 +1930,32 @@ dependencies = [
[[package]]
name = "stellar-macros"
-version = "0.4.1"
+version = "0.5.1"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.110",
]
[[package]]
name = "stellar-strkey"
-version = "0.0.13"
+version = "0.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ee1832fb50c651ad10f734aaf5d31ca5acdfb197a6ecda64d93fcdb8885af913"
+checksum = "5e3aa3ed00e70082cb43febc1c2afa5056b9bb3e348bbb43d0cd0aa88a611144"
dependencies = [
"crate-git-revision",
"data-encoding",
+ "thiserror",
]
[[package]]
name = "stellar-tokens"
-version = "0.4.1"
+version = "0.5.1"
dependencies = [
+ "cvlr",
+ "cvlr-soroban",
+ "cvlr-soroban-derive",
+ "cvlr-soroban-macros",
"ed25519-dalek",
"k256",
"p256",
@@ -1978,20 +1967,17 @@ dependencies = [
[[package]]
name = "stellar-xdr"
-version = "23.0.0"
+version = "22.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "89d2848e1694b0c8db81fd812bfab5ea71ee28073e09ccc45620ef3cf7a75a9b"
+checksum = "2ce69db907e64d1e70a3dce8d4824655d154749426a6132b25395c49136013e4"
dependencies = [
"arbitrary",
- "base64",
- "cfg_eval",
+ "base64 0.13.1",
"crate-git-revision",
"escape-bytes",
- "ethnum",
"hex",
"serde",
"serde_with",
- "sha2",
"stellar-strkey",
]
@@ -2020,9 +2006,9 @@ dependencies = [
[[package]]
name = "syn"
-version = "2.0.106"
+version = "2.0.110"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6"
+checksum = "a99801b5bd34ede4cf3fc688c5919368fea4e4814a4664359503e6015b280aea"
dependencies = [
"proc-macro2",
"quote",
@@ -2031,12 +2017,12 @@ dependencies = [
[[package]]
name = "tempfile"
-version = "3.21.0"
+version = "3.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "15b61f8f20e3a6f7e0649d825294eaf317edce30f82cf6026e7e4cb9222a7d1e"
+checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16"
dependencies = [
"fastrand",
- "getrandom 0.3.3",
+ "getrandom 0.3.4",
"once_cell",
"rustix",
"windows-sys",
@@ -2059,16 +2045,17 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.110",
]
[[package]]
name = "time"
-version = "0.3.43"
+version = "0.3.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "83bde6f1ec10e72d583d91623c939f623002284ef622b87de38cfd546cbf2031"
+checksum = "91e7d9e3bb61134e77bde20dd4825b97c010155709965fedf0f49bb138e52a9d"
dependencies = [
"deranged",
+ "itoa",
"num-conv",
"powerfmt",
"serde",
@@ -2094,9 +2081,9 @@ dependencies = [
[[package]]
name = "typenum"
-version = "1.18.0"
+version = "1.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f"
+checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb"
[[package]]
name = "unarray"
@@ -2106,9 +2093,9 @@ checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94"
[[package]]
name = "unicode-ident"
-version = "1.0.18"
+version = "1.0.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
+checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5"
[[package]]
name = "upgradeable-v1-example"
@@ -2130,7 +2117,7 @@ dependencies = [
[[package]]
name = "upgrader-example"
-version = "0.4.1"
+version = "0.5.1"
dependencies = [
"soroban-sdk",
"stellar-access",
@@ -2144,7 +2131,7 @@ version = "1.18.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f87b8aa10b915a06587d0dec516c282ff295b475d94abf425d62b57710070a2"
dependencies = [
- "getrandom 0.3.3",
+ "getrandom 0.3.4",
"js-sys",
"wasm-bindgen",
]
@@ -2171,19 +2158,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
[[package]]
-name = "wasi"
-version = "0.14.4+wasi-0.2.4"
+name = "wasip2"
+version = "1.0.1+wasi-0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "88a5f4a424faf49c3c2c344f166f0662341d470ea185e939657aaff130f0ec4a"
+checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7"
dependencies = [
"wit-bindgen",
]
[[package]]
name = "wasm-bindgen"
-version = "0.2.101"
+version = "0.2.105"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7e14915cadd45b529bb8d1f343c4ed0ac1de926144b746e2710f9cd05df6603b"
+checksum = "da95793dfc411fbbd93f5be7715b0578ec61fe87cb1a42b12eb625caa5c5ea60"
dependencies = [
"cfg-if",
"once_cell",
@@ -2192,25 +2179,11 @@ dependencies = [
"wasm-bindgen-shared",
]
-[[package]]
-name = "wasm-bindgen-backend"
-version = "0.2.101"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e28d1ba982ca7923fd01448d5c30c6864d0a14109560296a162f80f305fb93bb"
-dependencies = [
- "bumpalo",
- "log",
- "proc-macro2",
- "quote",
- "syn 2.0.106",
- "wasm-bindgen-shared",
-]
-
[[package]]
name = "wasm-bindgen-macro"
-version = "0.2.101"
+version = "0.2.105"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7c3d463ae3eff775b0c45df9da45d68837702ac35af998361e2c84e7c5ec1b0d"
+checksum = "04264334509e04a7bf8690f2384ef5265f05143a4bff3889ab7a3269adab59c2"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@@ -2218,22 +2191,22 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
-version = "0.2.101"
+version = "0.2.105"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7bb4ce89b08211f923caf51d527662b75bdc9c9c7aab40f86dcb9fb85ac552aa"
+checksum = "420bc339d9f322e562942d52e115d57e950d12d88983a14c79b86859ee6c7ebc"
dependencies = [
+ "bumpalo",
"proc-macro2",
"quote",
- "syn 2.0.106",
- "wasm-bindgen-backend",
+ "syn 2.0.110",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-shared"
-version = "0.2.101"
+version = "0.2.105"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f143854a3b13752c6950862c906306adb27c7e839f7414cec8fea35beab624c1"
+checksum = "76f218a38c84bcb33c25ec7059b07847d465ce0e0a76b995e134a45adcb6af76"
dependencies = [
"unicode-ident",
]
@@ -2262,7 +2235,7 @@ version = "0.116.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a58e28b80dd8340cb07b8242ae654756161f6fc8d0038123d679b7b99964fa50"
dependencies = [
- "indexmap 2.11.0",
+ "indexmap 2.12.0",
"semver",
]
@@ -2277,148 +2250,77 @@ dependencies = [
[[package]]
name = "windows-core"
-version = "0.61.2"
+version = "0.62.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3"
+checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb"
dependencies = [
"windows-implement",
"windows-interface",
- "windows-link 0.1.3",
+ "windows-link",
"windows-result",
"windows-strings",
]
[[package]]
name = "windows-implement"
-version = "0.60.0"
+version = "0.60.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836"
+checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.110",
]
[[package]]
name = "windows-interface"
-version = "0.59.1"
+version = "0.59.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8"
+checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.110",
]
[[package]]
name = "windows-link"
-version = "0.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a"
-
-[[package]]
-name = "windows-link"
-version = "0.2.0"
+version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "45e46c0661abb7180e7b9c281db115305d49ca1709ab8242adf09666d2173c65"
+checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
[[package]]
name = "windows-result"
-version = "0.3.4"
+version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6"
+checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5"
dependencies = [
- "windows-link 0.1.3",
+ "windows-link",
]
[[package]]
name = "windows-strings"
-version = "0.4.2"
+version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57"
+checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091"
dependencies = [
- "windows-link 0.1.3",
+ "windows-link",
]
[[package]]
name = "windows-sys"
-version = "0.60.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb"
-dependencies = [
- "windows-targets",
-]
-
-[[package]]
-name = "windows-targets"
-version = "0.53.3"
+version = "0.61.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91"
+checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
dependencies = [
- "windows-link 0.1.3",
- "windows_aarch64_gnullvm",
- "windows_aarch64_msvc",
- "windows_i686_gnu",
- "windows_i686_gnullvm",
- "windows_i686_msvc",
- "windows_x86_64_gnu",
- "windows_x86_64_gnullvm",
- "windows_x86_64_msvc",
+ "windows-link",
]
-[[package]]
-name = "windows_aarch64_gnullvm"
-version = "0.53.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764"
-
-[[package]]
-name = "windows_aarch64_msvc"
-version = "0.53.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c"
-
-[[package]]
-name = "windows_i686_gnu"
-version = "0.53.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3"
-
-[[package]]
-name = "windows_i686_gnullvm"
-version = "0.53.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11"
-
-[[package]]
-name = "windows_i686_msvc"
-version = "0.53.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d"
-
-[[package]]
-name = "windows_x86_64_gnu"
-version = "0.53.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba"
-
-[[package]]
-name = "windows_x86_64_gnullvm"
-version = "0.53.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57"
-
-[[package]]
-name = "windows_x86_64_msvc"
-version = "0.53.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486"
-
[[package]]
name = "wit-bindgen"
-version = "0.45.1"
+version = "0.46.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5c573471f125075647d03df72e026074b7203790d41351cd6edc96f46bcccd36"
+checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59"
[[package]]
name = "zerocopy"
@@ -2437,14 +2339,14 @@ checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.110",
]
[[package]]
name = "zeroize"
-version = "1.8.1"
+version = "1.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde"
+checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0"
dependencies = [
"zeroize_derive",
]
@@ -2457,5 +2359,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.106",
+ "syn 2.0.110",
]
diff --git a/Cargo.toml b/Cargo.toml
index 99d7d497..aadbc794 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -25,7 +25,7 @@ members = [
"packages/contract-utils",
"packages/macros",
"packages/test-utils/*",
- "packages/tokens",
+ "packages/tokens"
]
exclude = ["examples/upgradeable/testdata"]
@@ -37,21 +37,24 @@ repository = "https://github.com/OpenZeppelin/stellar-contracts"
documentation = "https://docs.openzeppelin.com/stellar-contracts/"
keywords = ["stellar", "soroban", "smart-contracts", "standards"]
categories = ["no-std", "wasm"]
-version = "0.4.1"
+version = "0.5.1"
[workspace.dependencies]
-soroban-sdk = "23.0.2"
+# certora change
+soroban-sdk = {package = "soroban-sdk", version = "=22.0.8", default-features = false}
proc-macro2 = "1.0"
proptest = "1"
quote = "1.0"
syn = { version = "2.0", features = ["full"] }
soroban-test-helpers = "0.2.3"
-hex-literal = "1.0.0"
+# certora change
+hex-literal = "0.4.0" # only used in tests, helps fix rust-analyzer issues
ed25519-dalek = "2.1.1"
k256 = "0.13.4"
p256 = "0.13.2"
serde = { version = "1", default-features = false }
serde-json-core = { version = "0.6.0", default-features = false }
+base64ct = { version = "=1.6.0" }
# members
stellar-access = { path = "packages/access" }
@@ -81,13 +84,16 @@ version = "0.4.0"
default-features = false
[workspace.dependencies.cvlr-soroban]
-git = "https://github.com/Certora/cvlr-soroban.git"
+git = "https://github.com/chandrakananandi/cvlr-soroban.git"
+branch = "soroban-22.0.8"
# path = "/Users/chandrakananandi/research/cvlr-soroban/cvlr-soroban"
[workspace.dependencies.cvlr-soroban-macros]
-git = "https://github.com/Certora/cvlr-soroban.git"
+git = "https://github.com/chandrakananandi/cvlr-soroban.git"
+branch = "soroban-22.0.8"
# path = "/Users/chandrakananandi/research/cvlr-soroban/cvlr-soroban-macros"
[workspace.dependencies.cvlr-soroban-derive]
-git = "https://github.com/Certora/cvlr-soroban.git"
+git = "https://github.com/chandrakananandi/cvlr-soroban.git"
+branch = "soroban-22.0.8"
# path = "/Users/chandrakananandi/research/cvlr-soroban/cvlr-soroban-derive"
\ No newline at end of file
diff --git a/README.md b/README.md
index 604460a9..54916e8a 100644
--- a/README.md
+++ b/README.md
@@ -14,13 +14,13 @@ OpenZeppelin Stellar Soroban Contracts is a collection of contracts for the Stel
## Project Structure
- `packages/`: Source code
- - `access/`: Role-based access controls and ownable
- - `contract-utils/`: Utilities for contracts (pausable, upgradeable, crypography, etc.)
- - `macros/`: Proc and derive macros for some of the modules (`#[only_owner]`, `#[when_not_paused]`, `#[derive(Upgradeable)]`, etc.)
- - `test-utils/`: Utilities for testing
- - `tokens/`: Various token types (fungible, non-fungible, etc.)
+ - [`access/`](packages/access): Role-based access controls and ownable
+ - [`accounts/`](packages/accounts): Smart accounts with custom authentication and authorization
+ - [`contract-utils/`](packages/contract-utils): Utilities for contracts (pausable, upgradeable, cryptography, etc.)
+ - [`macros/`](packages/macros): Proc and derive macros for some of the modules (`#[only_owner]`, `#[when_not_paused]`, `#[derive(Upgradeable)]`, etc.)
+ - [`test-utils/`](packages/test-utils): Utilities for testing
+ - [`tokens/`](packages/tokens): Various token types (fungible, non-fungible, real-world assets, vaults)
- `examples/`: Example contracts
-- `docs/`: Documentation
- `audits/`: Audit reports
@@ -54,9 +54,9 @@ We recommend pinning to a specific version, because rapid iterations are expecte
```toml
[dependencies]
-stellar-tokens = "=0.4.0"
-stellar-access = "=0.4.0"
-stellar-contract-utils = "=0.4.0"
+stellar-tokens = "=0.5.1"
+stellar-access = "=0.5.1"
+stellar-contract-utils = "=0.5.1"
```
## Notes
diff --git a/SECURITY.md b/SECURITY.md
new file mode 100644
index 00000000..4d71e52e
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,13 @@
+# Security Policy
+
+Security vulnerabilities should be disclosed to the project maintainers through [Immunefi], or alternatively by email to security@openzeppelin.com.
+
+[Immunefi]: https://immunefi.com/bug-bounty/openzeppelin-stellar
+
+## Bug Bounty
+
+Responsible disclosure of security vulnerabilities is rewarded through a bug bounty program on [Immunefi].
+
+## Legal
+
+Blockchain is a nascent technology and carries a high level of risk and uncertainty. OpenZeppelin makes certain software available under open source licenses, which disclaim all warranties in relation to the project and which limits the liability of OpenZeppelin. Subject to any particular licensing terms, your use of the project is governed by the terms found at [www.openzeppelin.com/tos](https://www.openzeppelin.com/tos) (the "Terms"). As set out in the Terms, you are solely responsible for any use of the project and you assume all risks associated with any such use. This Security Policy in no way evidences or represents an ongoing duty by any contributor, including OpenZeppelin, to correct any issues or vulnerabilities or alert you to all or any of the risks of utilizing the project.
diff --git a/audits/Stellar Contracts Library v0.5.0 Audit.pdf b/audits/Stellar Contracts Library v0.5.0 Audit.pdf
new file mode 100644
index 00000000..91ce6e1d
Binary files /dev/null and b/audits/Stellar Contracts Library v0.5.0 Audit.pdf differ
diff --git a/audits/Stellar Contracts Library v0.5.0 Re-Audit.pdf b/audits/Stellar Contracts Library v0.5.0 Re-Audit.pdf
new file mode 100644
index 00000000..22cfb9f8
Binary files /dev/null and b/audits/Stellar Contracts Library v0.5.0 Re-Audit.pdf differ
diff --git a/check_verification_status.py b/check_verification_status.py
new file mode 100755
index 00000000..5eb4ff33
--- /dev/null
+++ b/check_verification_status.py
@@ -0,0 +1,372 @@
+#!/usr/bin/env python3
+"""
+Script to analyze formal verification status across the project.
+
+Scans all files in /specs directories, counts #[rule] functions,
+and checks their //status comments to identify unverified rules.
+"""
+
+import os
+import re
+from pathlib import Path
+from collections import defaultdict
+from typing import Dict, List, Tuple, Optional
+import json
+
+
+class RuleInfo:
+ """Information about a single rule."""
+ def __init__(self, name: str, status: Optional[str], line_num: int):
+ self.name = name
+ self.status = status
+ self.line_num = line_num
+ self.is_verified = self._check_verified()
+ self.is_bug = self._check_if_bug()
+
+ def _check_verified(self) -> bool:
+ """Check if the rule is verified."""
+ if self.status is None:
+ return False
+ status_lower = self.status.lower().strip()
+ # Check if status starts with "verified"
+ return status_lower.startswith("verified")
+
+ def _check_if_bug(self) -> bool:
+ """Check if the rule is a bug."""
+ if self.status is None:
+ return False
+ status_lower = self.status.lower().strip()
+ return status_lower.startswith("bug")
+
+class FileAnalysis:
+ """Analysis results for a single file."""
+ def __init__(self, file_path: str):
+ self.file_path = file_path
+ self.rules: List[RuleInfo] = []
+ self.total_rules = 0
+ self.verified_rules = 0
+ self.unverified_rules = 0
+ self.bug_rules = 0
+
+ def add_rule(self, rule: RuleInfo):
+ """Add a rule to this file's analysis."""
+ self.rules.append(rule)
+ self.total_rules += 1
+ if rule.is_verified:
+ self.verified_rules += 1
+ elif not rule.is_bug:
+ self.unverified_rules += 1
+ if rule.is_bug:
+ self.bug_rules += 1
+
+
+def find_spec_files(root_dir: Path) -> List[Path]:
+ """Find all Rust files in specs directories."""
+ spec_files = []
+ excluded_dirs = {".certora_internal", "target", ".git"}
+
+ for path in root_dir.rglob("*.rs"):
+ # Skip if any part of the path is in excluded directories
+ if any(excluded in path.parts for excluded in excluded_dirs):
+ continue
+ # Only include files in specs directories
+ if "specs" in path.parts:
+ spec_files.append(path)
+
+ return sorted(spec_files)
+
+
+def extract_status_comment(lines: List[str], rule_line_idx: int, func_line_idx: int) -> Optional[str]:
+ """
+ Extract status comment from lines around a rule.
+ Looks for comments with 'status:' pattern before or after the #[rule] attribute.
+ Prioritizes forward search (between #[rule] and function) to avoid picking up
+ status comments from previous rules.
+ """
+ # First, look forwards between #[rule] and function definition
+ # This is the most common case and avoids picking up previous rule's status
+ end_idx = min(rule_line_idx + 15, func_line_idx, len(lines))
+ for i in range(rule_line_idx + 1, end_idx):
+ line = lines[i].strip()
+ # Match patterns like:
+ # // status: verified
+ # //status: verified
+ # // status: violated - bug
+ # // status: first assert verified
+ match = re.search(r'//\s*status\s*:\s*(.+)', line, re.IGNORECASE)
+ if match:
+ return match.group(1).strip()
+
+ # Only if not found forward, look backwards from the rule line
+ # Stop if we encounter another #[rule] or function definition
+ for i in range(rule_line_idx - 1, max(-1, rule_line_idx - 11), -1):
+ line = lines[i].strip()
+ # Stop if we hit another #[rule] or function definition
+ if '#[rule]' in line or re.search(r'(?:pub\s+)?fn\s+\w+', line):
+ break
+ match = re.search(r'//\s*status\s*:\s*(.+)', line, re.IGNORECASE)
+ if match:
+ return match.group(1).strip()
+
+ return None
+
+
+def extract_function_name(line: str) -> Optional[str]:
+ """Extract function name from a function definition line."""
+ # Match patterns like:
+ # pub fn function_name(
+ # fn function_name(
+ # pub fn function_name<...>(
+ match = re.search(r'(?:pub\s+)?fn\s+(\w+)', line)
+ if match:
+ return match.group(1)
+ return None
+
+
+def analyze_file(file_path: Path) -> FileAnalysis:
+ """Analyze a single Rust file for rules and their status."""
+ analysis = FileAnalysis(str(file_path))
+
+ try:
+ with open(file_path, 'r', encoding='utf-8') as f:
+ lines = f.readlines()
+ except Exception as e:
+ print(f"Error reading {file_path}: {e}", file=os.sys.stderr)
+ return analysis
+
+ for i, line in enumerate(lines):
+ # Look for #[rule] attribute
+ if '#[rule]' in line or '#[ rule ]' in line.replace(' ', ''):
+ # Find the function definition (should be within next few lines)
+ func_name = None
+ func_line_idx = i
+
+ # Look ahead for function definition (up to 15 lines to handle comments)
+ for j in range(i + 1, min(i + 15, len(lines))):
+ func_name = extract_function_name(lines[j])
+ if func_name:
+ func_line_idx = j
+ break
+
+ if func_name:
+ # Skip rules that end with _sanity
+ if func_name.endswith('_sanity'):
+ continue
+
+ # Extract status comment
+ status = extract_status_comment(lines, i, func_line_idx)
+ rule = RuleInfo(func_name, status, i + 1) # 1-indexed line numbers
+ analysis.add_rule(rule)
+
+ return analysis
+
+
+def get_directory(path: str) -> str:
+ """Get the directory path from a file path."""
+ return str(Path(path).parent)
+
+
+def get_relative_path(file_path: str, root_dir: Path) -> str:
+ """Convert absolute file path to relative path, removing root and packages/ prefix."""
+ try:
+ # Convert to Path and make relative to root
+ path = Path(file_path)
+ if path.is_absolute():
+ try:
+ relative = path.relative_to(root_dir)
+ except ValueError:
+ # If not relative to root, return as is
+ return file_path
+ else:
+ relative = path
+
+ # Convert to string and remove packages/ prefix if present
+ path_str = str(relative)
+ if path_str.startswith("packages/"):
+ path_str = path_str[len("packages/"):]
+
+ return path_str
+ except Exception:
+ return file_path
+
+
+def format_summary(analyses: List[FileAnalysis], output_format: str = "table", root_dir: Path = None) -> str:
+ """Format the analysis results."""
+ if root_dir is None:
+ root_dir = Path.cwd()
+ if output_format == "json":
+ return format_json(analyses, root_dir)
+ else:
+ return format_table(analyses, root_dir)
+
+
+def format_table(analyses: List[FileAnalysis], root_dir: Path) -> str:
+ """Format results as a table."""
+ output = []
+
+ # Project-wide totals
+ total_rules = sum(a.total_rules for a in analyses)
+ total_verified = sum(a.verified_rules for a in analyses)
+ total_unverified = sum(a.unverified_rules for a in analyses)
+ total_bug = sum(a.bug_rules for a in analyses)
+ output.append("=" * 40)
+ output.append("Formal Verification Status Summary")
+ output.append("=" * 40)
+ output.append("")
+ output.append(f"Project Total:")
+ output.append(f" Total Rules: {total_rules}")
+ output.append(f" Verified: {total_verified}")
+ output.append(f" Unverified: {total_unverified}")
+ output.append(f" Bug: {total_bug}")
+ output.append("")
+
+ # Group by directory
+ dir_stats: Dict[str, Dict[str, int]] = defaultdict(lambda: {"total": 0, "verified": 0, "unverified": 0, "bug": 0})
+ for analysis in analyses:
+ if analysis.total_rules > 0:
+ dir_path = get_relative_path(get_directory(analysis.file_path), root_dir)
+ dir_stats[dir_path]["total"] += analysis.total_rules
+ dir_stats[dir_path]["verified"] += analysis.verified_rules
+ dir_stats[dir_path]["unverified"] += analysis.unverified_rules
+ dir_stats[dir_path]["bug"] += analysis.bug_rules
+
+ output.append("=" * 40)
+ output.append("By Directory:")
+ output.append("=" * 40)
+ output.append("")
+
+ for dir_path in sorted(dir_stats.keys()):
+ stats = dir_stats[dir_path]
+ output.append(f"{dir_path}:")
+ output.append(f" Total: {stats['total']}, Verified: {stats['verified']}, Unverified: {stats['unverified']}, Bug: {stats['bug']}")
+ output.append("")
+
+ # By file
+ output.append("=" * 40)
+ output.append("By File:")
+ output.append("=" * 40)
+ output.append("")
+
+ for analysis in sorted(analyses, key=lambda x: x.file_path):
+ if analysis.total_rules > 0:
+ rel_path = get_relative_path(analysis.file_path, root_dir)
+ output.append(f"{rel_path}:")
+ output.append(f" Total: {analysis.total_rules}, Verified: {analysis.verified_rules}, Unverified: {analysis.unverified_rules}, Bug: {analysis.bug_rules}")
+
+ # List unverified rules
+ unverified = [r for r in analysis.rules if not r.is_verified and not r.is_bug]
+ if unverified:
+ output.append(" Unverified Rules:")
+ for rule in unverified:
+ status_str = rule.status if rule.status else "no status"
+ output.append(f" - {rule.name} (line {rule.line_num}): {status_str}")
+ output.append("")
+
+ return "\n".join(output)
+
+
+def format_json(analyses: List[FileAnalysis], root_dir: Path) -> str:
+ """Format results as JSON."""
+ result = {
+ "project_total": {
+ "total_rules": sum(a.total_rules for a in analyses),
+ "verified_rules": sum(a.verified_rules for a in analyses),
+ "unverified_rules": sum(a.unverified_rules for a in analyses),
+ "bug_rules": sum(a.bug_rules for a in analyses)
+ },
+ "by_directory": {},
+ "by_file": []
+ }
+
+ # Group by directory
+ dir_stats: Dict[str, Dict[str, int]] = defaultdict(lambda: {"total": 0, "verified": 0, "unverified": 0, "bug": 0})
+
+ for analysis in analyses:
+ if analysis.total_rules > 0:
+ dir_path = get_relative_path(get_directory(analysis.file_path), root_dir)
+ dir_stats[dir_path]["total"] += analysis.total_rules
+ dir_stats[dir_path]["verified"] += analysis.verified_rules
+ dir_stats[dir_path]["unverified"] += analysis.unverified_rules
+ dir_stats[dir_path]["bug"] += analysis.bug_rules
+
+ for dir_path, stats in sorted(dir_stats.items()):
+ result["by_directory"][dir_path] = stats.copy()
+
+ # By file
+ for analysis in sorted(analyses, key=lambda x: x.file_path):
+ if analysis.total_rules > 0:
+ rel_path = get_relative_path(analysis.file_path, root_dir)
+ file_data = {
+ "file": rel_path,
+ "total_rules": analysis.total_rules,
+ "verified_rules": analysis.verified_rules,
+ "unverified_rules": analysis.unverified_rules,
+ "bug_rules": analysis.bug_rules,
+ "rules": []
+ }
+
+ for rule in analysis.rules:
+ file_data["rules"].append({
+ "name": rule.name,
+ "line": rule.line_num,
+ "status": rule.status,
+ "verified": rule.is_verified,
+ "bug": rule.is_bug
+ })
+
+ result["by_file"].append(file_data)
+
+ return json.dumps(result, indent=2)
+
+
+def main():
+ """Main entry point."""
+ import argparse
+
+ parser = argparse.ArgumentParser(
+ description="Analyze formal verification status across the project"
+ )
+ parser.add_argument(
+ "--format",
+ choices=["table", "json"],
+ default="table",
+ help="Output format (default: table)"
+ )
+ parser.add_argument(
+ "--root",
+ type=str,
+ default=".",
+ help="Root directory to search (default: current directory)"
+ )
+
+ args = parser.parse_args()
+
+ root_dir = Path(args.root).resolve()
+
+ if not root_dir.exists():
+ print(f"Error: Root directory does not exist: {root_dir}", file=os.sys.stderr)
+ return 1
+
+ # Find all spec files
+ spec_files = find_spec_files(root_dir)
+
+ if not spec_files:
+ print("No spec files found in specs directories.", file=os.sys.stderr)
+ return 1
+
+ # Analyze each file
+ analyses = []
+ for spec_file in spec_files:
+ analysis = analyze_file(spec_file)
+ if analysis.total_rules > 0:
+ analyses.append(analysis)
+
+ # Format and print results
+ output = format_summary(analyses, args.format, root_dir)
+ print(output)
+
+ return 0
+
+
+if __name__ == "__main__":
+ exit(main())
diff --git a/docs/README.md b/docs/README.md
deleted file mode 100644
index 034d41e0..00000000
--- a/docs/README.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# Docs Editing Readme
-
-#### Build and run the documentation
-
-* Run `npm install` to install the dependencies
-* Run `npm run docs` to build the directory
-* Run `npm run docs:watch` to run the inner docs website
-* Open `https://127.0.0.1:8080/` to see the compiled docs
-
-#### Add a new page
-
-* Create a new file at desired destination
-* Add your info to the page
-* Add a link to the `docs/modules/ROOT/nav.adoc`
diff --git a/docs/antora.yml b/docs/antora.yml
deleted file mode 100644
index e7b66fda..00000000
--- a/docs/antora.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-name: stellar-contracts
-title: Stellar Contracts
-version: 0.4.0
-nav:
- - modules/ROOT/nav.adoc
-asciidoc:
- attributes:
- page-sidebar-collapse-default: false
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
deleted file mode 100644
index bf2ae9c4..00000000
--- a/docs/modules/ROOT/nav.adoc
+++ /dev/null
@@ -1,17 +0,0 @@
-* Tokens
-** xref:tokens/fungible/fungible.adoc[Fungible Tokens]
-** xref:tokens/non-fungible/non-fungible.adoc[Non-Fungible Tokens]
-
-* Access
-** xref:access/access-control.adoc[Access Control]
-** xref:access/ownable.adoc[Ownable]
-
-* Utilities
-** xref:utils/pausable.adoc[Pausable]
-** xref:utils/upgradeable.adoc[Upgradeable]
-** xref:utils/crypto.adoc[Cryptography]
-
-* Helpers
-** xref:helpers/default-impl-macro.adoc[Default Implementation Macro]
-
-* xref:get-started.adoc[Get Started]
diff --git a/docs/modules/ROOT/pages/access/access-control.adoc b/docs/modules/ROOT/pages/access/access-control.adoc
deleted file mode 100644
index 94db21a8..00000000
--- a/docs/modules/ROOT/pages/access/access-control.adoc
+++ /dev/null
@@ -1,113 +0,0 @@
-:source-highlighter: highlight.js
-:highlightjs-languages: rust
-:github-icon: pass:[]
-= Access Control
-
-https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/access/src/access-control[Source Code]
-
-== Overview
-
-The Access Control module provides a comprehensive role-based access control system for Soroban contracts. It enables developers to manage permissions through a hierarchical role system, with a renounceable single overarching admin and customizable role assignments.
-
-== Key Concepts
-
-=== Admin Management
-
-The system features a single top-level admin with privileges to call any function in the `AccessControl` trait. This admin must be set during contract initialization for the module to function properly. This overarching admin can renounce themselves for decentralization purposes.
-
-Admin transfers are implemented as a two-step process to prevent accidental or malicious takeovers:
-
-1. The current admin *initiates* the transfer by specifying the new admin and an expiration time (`live_until_ledger`).
-2. The designated new admin must *explicitly accept* the transfer to complete it.
-
-Until the transfer is accepted, the original admin retains full control and can override or cancel the transfer by initiating a new one or using a `live_until_ledger` of `0`.
-
-=== Role Hierarchy
-
-The module supports a hierarchical role system where each role can have an "admin role" assigned to it. For example:
-
-* Create roles `minter` and `minter_admin`
-* Assign `minter_admin` as the admin role for the `minter` role
-* Accounts with the `minter_admin` role can grant/revoke the `minter` role to other accounts
-
-This allows for creating complex organizational structures with chains of command and delegated authority.
-
-=== Role Enumeration
-
-The system tracks account-role pairs in storage with additional enumeration logic:
-
-* When a role is granted to an account, the pair is stored and added to enumeration storage
-* When a role is revoked, the pair is removed from storage and enumeration
-* If all accounts are removed from a role, the helper storage items become empty or 0
-
-Roles exist only through their relationships with accounts, so a role with zero accounts is indistinguishable from a role that never existed.
-
-== Usage Example
-
-Here's a simple example of using the Access Control module:
-
-[source,rust]
-----
-use soroban_sdk::{contract, contractimpl, symbol_short, Address, Env};
-use stellar_access::access_control::{self as access_control, AccessControl};
-use stellar_macros::{has_role, only_admin};
-
-#[contract]
-pub struct MyContract;
-
-#[contractimpl]
-impl MyContract {
- pub fn __constructor(e: &Env, admin: Address) {
- // Set the contract admin
- access_control::set_admin(e, &admin);
-
- // Create a "minter" role with admin as its admin
- access_control::set_role_admin_no_auth(e, &symbol_short!("minter"), &symbol_short!("admin"));
- }
-
- #[only_admin]
- pub fn admin_restricted_function(e: &Env) -> Vec {
- vec![&e, String::from_str(e, "seems sus")]
- }
-
- // we want `require_auth()` provided by the macro, since there is no
- // `require_auth()` in `Base::mint`.
- #[only_role(caller, "minter")]
- pub fn mint(e: &Env, caller: Address, to: Address, token_id: u32) {
- Base::mint(e, &to, token_id)
- }
-
- // allows either minter or burner role, does not enforce `require_auth` in the macro
- #[has_any_role(caller, ["minter", "burner"])]
- pub fn multi_role_action(e: &Env, caller: Address) -> String {
- caller.require_auth();
- String::from_str(e, "multi_role_action_success")
- }
-
- // allows either minter or burner role AND enforces `require_auth` in the macro
- #[only_any_role(caller, ["minter", "burner"])]
- pub fn multi_role_auth_action(e: &Env, caller: Address) -> String {
- String::from_str(e, "multi_role_auth_action_success")
- }
-}
-----
-
-== Benefits and Trade-offs
-
-=== Benefits
-
-* Flexible role-based permission system
-* Hierarchical role management
-* Secure admin transfer process
-* Admin is renounceable
-* Easy integration with procedural macros
-
-=== Trade-offs
-
-* More complex than single-owner models like Ownable
-
-== See Also
-
-* xref:access/ownable.adoc[Ownable]
-* xref:tokens/fungible/fungible.adoc[Fungible Token]
-* xref:tokens/non-fungible/non-fungible.adoc[Non-Fungible Token]
diff --git a/docs/modules/ROOT/pages/access/ownable.adoc b/docs/modules/ROOT/pages/access/ownable.adoc
deleted file mode 100644
index 69b8b2fc..00000000
--- a/docs/modules/ROOT/pages/access/ownable.adoc
+++ /dev/null
@@ -1,102 +0,0 @@
-:source-highlighter: highlight.js
-:highlightjs-languages: rust
-:github-icon: pass:[]
-= Ownable
-
-https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/access/src/ownable[Source Code]
-
-== Overview
-
-The Ownable module provides a simple access control mechanism where a contract has a single account (owner) that can be granted exclusive access to specific functions. This pattern is useful for contracts that need a straightforward authorization system with a single privileged account.
-
-== Key Concepts
-
-=== Ownership Management
-
-The system designates a single owner with exclusive access to functions marked with the `#[only_owner]` macro. The initial owner must be ideally set during contract initialization for the module to function properly.
-
-Like the Access Control module, ownership transfers are implemented as a two-step process to prevent accidental or malicious takeovers:
-
-1. The current owner *initiates* the transfer by specifying the new owner and an expiration time (`live_until_ledger`).
-2. The designated new owner must *explicitly accept* the transfer to complete it.
-
-Until the transfer is accepted, the original owner retains full control and can override or cancel the transfer by initiating a new one or using a `live_until_ledger` of `0`.
-
-=== Ownership Renunciation
-
-The Ownable module allows the owner to permanently renounce ownership of the contract. This is a one-way operation that cannot be undone. After ownership is renounced, all functions marked with `#[only_owner]` become permanently inaccessible.
-
-This feature is useful for contracts that need to become fully decentralized after an initial setup phase.
-
-=== Procedural Macro
-
-The module includes a procedural macro to simplify owner authorization checks:
-
-==== @only_owner
-
-Ensures the caller is the owner before executing the function:
-
-[source,rust]
-----
-#[only_owner]
-pub fn restricted_function(e: &Env, other_param: u32) {
- // Function body - only accessible to owner
-}
-----
-
-This expands to code that retrieves the owner from storage and requires authorization before executing the function body.
-
-== Usage Example
-
-Here's a simple example of using the Ownable module:
-
-[source,rust]
-----
-use soroban_sdk::{contract, contractimpl, Address, Env};
-use stellar_access::ownable::{self as ownable, Ownable};
-use stellar_macros::only_owner;
-
-#[contract]
-pub struct MyContract;
-
-#[contractimpl]
-impl MyContract {
- pub fn __constructor(e: &Env, initial_owner: Address) {
- // Set the contract owner
- ownable::set_owner(e, &initial_owner);
- }
-
- #[only_owner]
- pub fn update_config(e: &Env, new_value: u32) {
- // Only the owner can call this function
- // Implementation...
- }
-
- // This function is accessible to anyone
- pub fn get_config(e: &Env) -> u32 {
- // Implementation...
- 42
- }
-}
-----
-
-== Benefits and Trade-offs
-
-=== Benefits
-
-* Simple and straightforward ownership model
-* Secure two-step ownership transfer process
-* Option to permanently renounce ownership
-* Easy integration with procedural macro
-* Event emission for important actions
-
-=== Trade-offs
-
-* Limited to a single privileged account (compared to role-based systems)
-* Once ownership is renounced, privileged functions become permanently inaccessible
-
-== See Also
-
-* xref:access/access-control.adoc[Access Control]
-* xref:tokens/fungible/fungible.adoc[Fungible Token]
-* xref:tokens/non-fungible/non-fungible.adoc[Non-Fungible Token]
diff --git a/docs/modules/ROOT/pages/get-started.adoc b/docs/modules/ROOT/pages/get-started.adoc
deleted file mode 100644
index e85618f3..00000000
--- a/docs/modules/ROOT/pages/get-started.adoc
+++ /dev/null
@@ -1,10 +0,0 @@
-= Get Started
-
-Not sure where to start? Use the interactive generator below to bootstrap your contract and find about the components offered in OpenZeppelin Smart Contracts Suite for Stellar. You can also access the code generator from https://wizard.openzeppelin.com/stellar[here].
-
-++++
-
-
-
-++++
-
diff --git a/docs/modules/ROOT/pages/helpers/default-impl-macro.adoc b/docs/modules/ROOT/pages/helpers/default-impl-macro.adoc
deleted file mode 100644
index 466546c3..00000000
--- a/docs/modules/ROOT/pages/helpers/default-impl-macro.adoc
+++ /dev/null
@@ -1,98 +0,0 @@
-:source-highlighter: highlight.js
-:highlightjs-languages: rust
-:github-icon: pass:[]
-= Default Implementation Macro
-
-https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/contract-utils/src/default-impl-macro[Source Code]
-
-== Overview
-
-The `#[default_impl]` macro is a utility that simplifies the implementation of OpenZeppelin Stellar
-contract traits by automatically generating default implementations for trait methods. This allows developers
-to focus only on overriding the methods they need to customize, while the macro handles the rest.
-
-== Background
-
-When using Soroban's `#[contractimpl]` macro, all methods (including default implementations) must be explicitly
-included in the implementation block for them to be accessible to the generated client. This is due to how
-Rust macros work - they cannot access default implementations of trait methods that are not in the scope of the macro.
-
-The `#[default_impl]` macro solves this problem by automatically generating the missing default implementations
-for OpenZeppelin Stellar traits.
-
-== Supported Traits
-
-The `#[default_impl]` macro supports the following OpenZeppelin Stellar traits:
-
-* `FungibleToken`
-* `FungibleBurnable`
-* `NonFungibleToken`
-* `NonFungibleBurnable`
-* `NonFungibleEnumerable`
-* `AccessControl`
-* `Ownable`
-
-The `#[default_impl]` macro intentionally does not support the following traits:
-
-* `FungibleAllowlist`
-* `FungibleBlocklist`
-* `NonFungibleRoyalties`
-
-This limitation is by design: authorization configurations require specific implementation tailored to
-each project's security requirements. By requiring manual implementation of these traits, we ensure
-developers carefully consider and explicitly define their authorization logic rather than relying on generic defaults.
-
-== Usage
-
-To use the `#[default_impl]` macro, place it above the `#[contractimpl]` macro when implementing one of the supported traits:
-
-[source,rust]
-----
-#[default_impl] // IMPORTANT: place this above `#[contractimpl]`
-#[contractimpl]
-impl NonFungibleToken for MyContract {
- type ContractType = Base;
-
- // Only override the methods you need to customize
- // All other methods will be automatically implemented with their default behavior
-}
-----
-
-== How It Works
-
-The `#[default_impl]` macro:
-
-. Identifies which trait is being implemented
-. Determines which methods are explicitly defined by the user
-. Uses the user defined methods to overwrite the default implementations
-. Fills the rest of the methods (not defined by the user) with default implementations
-. Adds any necessary imports for the trait
-
-This process ensures that all trait methods are available to the client generated by `#[contractimpl]`, while allowing developers to only write the code they need to customize.
-
-== Examples
-
-=== Fungible Token Example
-
-[source,rust]
-----
-use soroban_sdk::{contract, contractimpl, Address, Env};
-use stellar_tokens::fungible::FungibleToken;
-use stellar_macros::default_impl;
-
-#[contract]
-pub struct MyToken;
-
-#[default_impl]
-#[contractimpl]
-impl FungibleToken for MyToken {
- type ContractType = Base;
-
- // Only override methods that need custom behavior
- fn transfer(e: &Env, from: Address, to: Address, amount: i128) {
- // custom transfer logic here
- }
-
- // All other FungibleToken methods will be automatically implemented
-}
-----
diff --git a/docs/modules/ROOT/pages/index.adoc b/docs/modules/ROOT/pages/index.adoc
deleted file mode 100644
index 17495da6..00000000
--- a/docs/modules/ROOT/pages/index.adoc
+++ /dev/null
@@ -1,52 +0,0 @@
-:source-highlighter: highlight.js
-:highlightjs-languages: bash
-
-= Stellar Smart Contracts Suite
-
-A comprehensive collection of secure, scalable smart contracts and utilities for the Stellar network,
-supporting Fungible, Non-Fungible, and Multi-Token standards.
-
-== Tokens
-Explore our implementations for token standards on Stellar Soroban:
-
-- **xref:tokens/fungible/fungible.adoc[Fungible Tokens]**: Digital assets representing a fixed or dynamic supply of identical units.
-- **xref:tokens/non-fungible/non-fungible.adoc[Non-Fungible Tokens]**: Unique digital assets with verifiable ownership.
-- **Multi-Token**: Hybrid tokens enabling both fungible and non-fungible token functionalities (work in progress).
-
-== Utilities
-Discover our utility contracts for Stellar Soroban, applicable to all token standards mentioned above:
-
-- **xref:utils/pausable.adoc[Pausable]**
-- **xref:utils/upgradeable.adoc[Upgrades and Migrations]**
-
-== Error Codes
-In Stellar Soroban, each error variant is assigned an integer. To prevent duplication of error codes,
-we use the following convention:
-
-* Fungible: `1XX`
-* Non-Fungible: `2XX`
-* Multi-Token: `3XX`
-
-Any future tokens will continue from `4XX`, `5XX`, and so on.
-
-* Utilities: `1XXX`
-** Pausable: `10XX`
-** Upgradeable: `11XX`
-** Access: `12XX`
-*** Role Transfer (internal common module for 2-step role transfer): `120X`
-*** Access Control: `121X`
-*** Ownable: `122X`
-** Merkle Distributor: `13XX`
-
-Any future utilities will continue from `14XX`, `15XX`, and so on.
-
-== Important Notes
-As a deliberate design choice, this library manages the TTL for temporary and persistent storage items.
-To provide flexibility to the owner of the contract, this library deliberately does not manage the TTL for instance storage items.
-It is the responsibility of the developer to manage the TTL for instance storage items.
-
-== Audits
-You can find our audit reports https://github.com/OpenZeppelin/stellar-contracts/tree/main/audits[here].
-
-== Get Started
-Get started xref:get-started.adoc[here].
diff --git a/docs/modules/ROOT/pages/tokens/fungible/fungible.adoc b/docs/modules/ROOT/pages/tokens/fungible/fungible.adoc
deleted file mode 100644
index 95e76ac1..00000000
--- a/docs/modules/ROOT/pages/tokens/fungible/fungible.adoc
+++ /dev/null
@@ -1,146 +0,0 @@
-:source-highlighter: highlight.js
-:highlightjs-languages: rust
-:github-icon: pass:[]
-= Fungible Token
-
-https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/tokens/src/fungible[Source Code]
-
-Fungible tokens represent assets where each unit is identical and interchangeable, such as currencies,
-commodities, or utility tokens. On Stellar, you can create fungible tokens where each token has the
-same value and properties, with balances and ownership tracked through Soroban smart contracts.
-
-== Overview
-
-The https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/tokens/src/fungible[fungible]
-module provides three different Fungible Token variants that differ in how certain features like
-token transfers and approvals are handled:
-
-
-The module provides several implementation options to suit different use cases:
-
-1. *Base implementation* (`FungibleToken` with `Base` contract type): Suitable for most standard token use cases.
-2. *AllowList extension* (`FungibleToken` with `AllowList` contract type): For tokens that require an allowlist mechanism to control who can transfer tokens.
-3. *BlockList extension* (`FungibleToken` with `BlockList` contract type): For tokens that need to block specific addresses from transferring tokens.
-
-These implementations share core functionality and a common interface, exposing identical contract functions as entry-points. However, the extensions provide specialized behavior by overriding certain functions to implement their specific requirements.
-
-== Usage
-
-We'll create a simple token for a game's in-game currency. Players can earn tokens by completing tasks,
-and they can spend tokens on in-game items. The contract owner can mint new tokens as needed,
-and players can transfer tokens between accounts.
-
-Here's what a basic fungible token contract might look like:
-
-[source,rust]
-----
-use soroban_sdk::{contract, contractimpl, Address, Env, String};
-use stellar_tokens::fungible::{burnable::FungibleBurnable, Base, ContractOverrides, FungibleToken};
-use stellar_access::ownable::{self as ownable, Ownable};
-use stellar_macros::{default_impl, only_owner};
-
-#[contract]
-pub struct GameCurrency;
-
-#[contractimpl]
-impl GameCurrency {
- pub fn __constructor(e: &Env, initial_owner: Address) {
- // Set token metadata
- Base::set_metadata(
- e,
- 8, // 8 decimals
- String::from_str(e, "Game Currency"),
- String::from_str(e, "GCUR"),
- );
-
- // Set the contract owner
- ownable::set_owner(e, &initial_owner);
- }
-
- #[only_owner]
- pub fn mint_tokens(e: &Env, to: Address, amount: i128) {
- // Mint tokens to the recipient
- Base::mint(e, &to, amount);
- }
-}
-
-#[default_impl]
-#[contractimpl]
-impl FungibleToken for GameCurrency {
- type ContractType = Base;
-}
-
-#[default_impl]
-#[contractimpl]
-impl FungibleBurnable for GameCurrency {}
-----
-
-== Extensions
-
-The following optional extensions are provided:
-
-=== - Burnable
-https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/tokens/src/fungible/extensions/burnable[Source Code]
-
-The `FungibleBurnable` trait extends the `FungibleToken` trait to provide the capability to burn tokens.
-To fully comply with the SEP-41 specification, a contract must implement both the `FungibleToken`
-and `FungibleBurnable` traits.
-
-=== - Capped
-https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/tokens/src/fungible/extensions/capped[Source Code]
-
-Unlike other extensions, the capped extension does not expose a separate trait. Instead,
-it offers helper functions designed to assist in implementing the mint function, enforcing a supply cap.
-
-=== - AllowList
-https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/tokens/src/fungible/extensions/allowlist[Source Code]
-
-The `FungibleAllowList` trait extends the `FungibleToken` trait to provide an allowlist mechanism that
-can be managed by an authorized account. This extension ensures that only allowed accounts can
-transfer/receive tokens or approve token transfers.
-
-=== - BlockList
-https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/tokens/src/fungible/extensions/blocklist[Source Code]
-
-The `FungibleBlockList` trait extends the `FungibleToken` trait to provide a blocklist mechanism that
-can be managed by an authorized account. This extension ensures that blocked accounts cannot transfer/receive
-tokens, or approve token transfers.
-
-=== TokenInterface Macro
-
-For contracts that implement both `FungibleToken` and `FungibleBurnable` and also need to implement
-`soroban_sdk::token::TokenInterface`, we provide the `impl_token_interface!` macro. This macro automatically
-generates the required boilerplate, simplifying the implementation process.
-
-== Utility Modules
-
-The package includes utility modules to help with common token implementation patterns:
-
-=== - SAC Admin Generic
-https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/tokens/src/fungible/utils/sac_admin_generic[Source Code]
-
-Provides generic admin functionality similar to the Stellar Asset Contract (SAC). This approach leverages the `__check_auth` function to handle authentication and authorization logic while maintaining a unified interface.
-
-For detailed documentation, see xref:tokens/fungible/sac-admin-generic.adoc[SAC Admin Generic].
-
-=== - SAC Admin Wrapper
-https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/tokens/src/fungible/utils/sac_admin_wrapper[Source Code]
-
-Provides a wrapper around the SAC admin functionality for easier integration. This approach defines specific entry points for each admin function and forwards calls to the corresponding SAC functions.
-
-For detailed documentation, see xref:tokens/fungible/sac-admin-wrapper.adoc[SAC Admin Wrapper].
-
-== Compatibility and Compliance
-
-The module is designed to ensure full compatibility with SEP-0041. It also closely mirrors the Ethereum ERC-20
-standard, facilitating cross-ecosystem familiarity and ease of use.
-
-To comply with the SEP-41 specification, a contract must implement both the `FungibleToken` and
-`FungibleBurnable` traits. These traits together provide all the necessary methods to conform to
-`soroban_sdk::token::TokenInterface`.
-
-== TTL Management
-
-The library handles the TTL (Time-To-Live) of only `temporary` and `persistent` storage entries declared
-by the library. The `instance` TTL management is left to the implementor due to flexibility. The library
-exposes default values for extending the TTL: `INSTANCE_TTL_THRESHOLD` and `INSTANCE_EXTEND_AMOUNT`.
diff --git a/docs/modules/ROOT/pages/tokens/fungible/sac-admin-generic.adoc b/docs/modules/ROOT/pages/tokens/fungible/sac-admin-generic.adoc
deleted file mode 100644
index 51c21109..00000000
--- a/docs/modules/ROOT/pages/tokens/fungible/sac-admin-generic.adoc
+++ /dev/null
@@ -1,200 +0,0 @@
-:source-highlighter: highlight.js
-:highlightjs-languages: rust
-:github-icon: pass:[]
-= SAC Admin Generic
-
-https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/tokens/src/fungible/utils/sac_admin_generic[Source Code]
-
-== Overview
-
-The Stellar Asset Contract (SAC) Admin Generic module provides a way to implement custom administrative
-functionality for Stellar Asset Contracts (SACs) using the generic approach. This approach leverages the
-`__check_auth` function to handle authentication and authorization logic while maintaining a unified
-interface for both user-facing and admin functions.
-
-== Key Concepts
-
-When a classic Stellar asset is ported to Soroban, it is represented by a SAC - a smart contract that provides
-both user-facing and administrative functions for asset management. SACs expose standard functions for handling
-fungible tokens, such as `transfer`, `approve`, `burn`, etc. Additionally, they include administrative functions
-(`mint`, `clawback`, `set_admin`, `set_authorized`) that are initially restricted to the issuer (a G-account).
-
-The `set_admin` function enables transferring administrative control to a custom contract, allowing for more
-complex authorization logic. This flexibility opens up possibilities for implementing custom rules, such as
-role-based access control, two-step admin transfers, mint rate limits, and upgradeability.
-
-== Generic Approach
-
-The Generic approach to SAC Admin implementation:
-
-* Leverages the `__check_auth` function to handle authentication and authorization logic
-* Maintains a unified interface for both user-facing and admin functions
-* Allows for injecting any custom authorization logic
-* Requires a more sophisticated authorization mechanism
-
-=== Example Implementation
-
-Here's a simplified example of a SAC Admin Generic contract:
-
-[source,rust]
-----
-#[contracterror]
-#[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord)]
-#[repr(u32)]
-pub enum SACAdminGenericError {
- Unauthorized = 1,
- InvalidContext = 2,
- MintingLimitExceeded = 3,
-}
-
-#[contracttype]
-#[derive(Clone)]
-pub struct Signature {
- pub public_key: BytesN<32>,
- pub signature: BytesN<64>,
-}
-
-#[contracttype]
-pub enum SacDataKey {
- Chief,
- Operator(BytesN<32>), // -> true/false
- MintingLimit(BytesN<32>), // -> (max_limit, curr)
-}
-
-#[contract]
-pub struct SacAdminExampleContract;
-
-#[contractimpl]
-impl SacAdminExampleContract {
- pub fn __constructor(e: Env, sac: Address, chief: BytesN<32>, operator: BytesN<32>) {
- set_sac_address(&e, &sac);
- e.storage().instance().set(&SacDataKey::Chief, &chief);
- e.storage().instance().set(&SacDataKey::Operator(operator.clone()), &true);
- e.storage()
- .instance()
- .set(&SacDataKey::MintingLimit(operator), &(1_000_000_000i128, 0i128));
- }
-
- pub fn get_sac_address(e: &Env) -> Address {
- get_sac_address(e)
- }
-}
-----
-
-=== Custom Authorization Logic
-
-The key feature of the Generic approach is the ability to implement custom authorization logic in the `__check_auth`
-function:
-
-[source,rust]
-----
-use soroban_sdk::{
- auth::{Context, CustomAccountInterface},
- contract, contracterror, contractimpl, contracttype,
- crypto::Hash,
- Address, BytesN, Env, IntoVal, Val, Vec,
-};
-
-#[contractimpl]
-impl CustomAccountInterface for SacAdminExampleContract {
- type Error = SACAdminGenericError;
- type Signature = Signature;
-
- fn __check_auth(
- e: Env,
- payload: Hash<32>,
- signature: Self::Signature,
- auth_context: Vec,
- ) -> Result<(), SACAdminGenericError> {
- // authenticate
- e.crypto().ed25519_verify(
- &signature.public_key,
- &payload.clone().into(),
- &signature.signature,
- );
- let caller = signature.public_key.clone();
-
- // extract from context and check required permissions for every function
- for ctx in auth_context.iter() {
- let context = match ctx {
- Context::Contract(c) => c,
- _ => return Err(SACAdminGenericError::InvalidContext),
- };
-
- match extract_sac_contract_context(&e, &context) {
- SacFn::Mint(amount) => {
- // ensure caller has required permissions
- ensure_caller_operator(&e, &SacDataKey::Operator(caller.clone()))?;
- // ensure operator has minting limit
- ensure_minting_limit(&e, &caller, amount)?;
- }
- SacFn::Clawback(_amount) => {
- // ensure caller has required permissions
- ensure_caller_operator(&e, &SacDataKey::Operator(caller.clone()))?;
- }
- SacFn::SetAuthorized(_) => {
- // ensure caller has required permissions
- ensure_caller_operator(&e, &SacDataKey::Operator(caller.clone()))?;
- }
- SacFn::SetAdmin => {
- // ensure caller has required permissions
- ensure_caller_chief(&e, &caller, &SacDataKey::Chief)?;
- }
- SacFn::Unknown => {
- // ensure only chief can call other functions
- ensure_caller_chief(&e, &caller, &SacDataKey::Chief)?
- }
- }
- }
-
- Ok(())
- }
-}
-
-// Helper functions
-fn ensure_caller_chief>(
- e: &Env,
- caller: &BytesN<32>,
- key: &K,
-) -> Result<(), SACAdminGenericError> {
- let operator: BytesN<32> = e.storage().instance().get(key).expect("chief or operator not set");
- if *caller != operator {
- return Err(SACAdminGenericError::Unauthorized);
- }
- Ok(())
-}
-
-fn ensure_caller_operator>(
- e: &Env,
- key: &K,
-) -> Result<(), SACAdminGenericError> {
- match e.storage().instance().get::<_, bool>(key) {
- Some(is_op) if is_op => Ok(()),
- _ => Err(SACAdminGenericError::Unauthorized),
- }
-}
-----
-
-== Benefits and Trade-offs
-
-=== Benefits
-
-* Maintains a unified interface for both user-facing and admin functions
-* Allows for complex authorization logic
-* Provides flexibility in implementing custom rules
-
-=== Trade-offs
-
-* Requires a more sophisticated authorization mechanism
-* More complex to implement compared to the wrapper approach
-* Requires understanding of the Soroban authorization system
-
-== Full Example
-
-A complete example implementation can be found in the
-https://github.com/OpenZeppelin/stellar-contracts/tree/main/examples/sac-admin-generic[sac-admin-generic example].
-
-== See Also
-
-* xref:tokens/fungible/sac-admin-wrapper.adoc[SAC Admin Wrapper]
-* xref:tokens/fungible/fungible.adoc[Fungible Token]
diff --git a/docs/modules/ROOT/pages/tokens/fungible/sac-admin-wrapper.adoc b/docs/modules/ROOT/pages/tokens/fungible/sac-admin-wrapper.adoc
deleted file mode 100644
index f82fb628..00000000
--- a/docs/modules/ROOT/pages/tokens/fungible/sac-admin-wrapper.adoc
+++ /dev/null
@@ -1,125 +0,0 @@
-:source-highlighter: highlight.js
-:highlightjs-languages: rust
-:github-icon: pass:[]
-= SAC Admin Wrapper
-
-https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/tokens/src/fungible/utils/sac_admin_wrapper[Source Code]
-
-== Overview
-
-The Stellar Asset Contract (SAC) Admin Wrapper module provides a way to implement custom administrative functionality for Stellar Asset Contracts (SACs) using the wrapper approach. This approach defines specific entry points for each admin function and forwards calls to the corresponding SAC functions, providing a straightforward and modular design.
-
-== Key Concepts
-
-When a classic Stellar asset is ported to Soroban, it is represented by a SAC - a smart contract that provides both user-facing and administrative functions for asset management. SACs expose standard functions for handling fungible tokens, such as `transfer`, `approve`, `burn`, etc. Additionally, they include administrative functions (`mint`, `clawback`, `set_admin`, `set_authorized`) that are initially restricted to the issuer (a G-account).
-
-The `set_admin` function enables transferring administrative control to a custom contract, allowing for more complex authorization logic. This flexibility opens up possibilities for implementing custom rules, such as role-based access control, two-step admin transfers, mint rate limits, and upgradeability.
-
-== Wrapper Approach
-
-The Wrapper approach to SAC Admin implementation:
-
-* Acts as a middleware, defining specific entry points for each admin function
-* Forwards calls to the corresponding SAC functions
-* Applies custom logic before forwarding the call
-* Provides a straightforward and modular design
-* Separates user-facing and admin interfaces
-
-=== SACAdminWrapper Trait
-
-The `SACAdminWrapper` trait defines the interface for the wrapper approach:
-
-[source,rust]
-----
-pub trait SACAdminWrapper {
- fn set_admin(e: Env, new_admin: Address, operator: Address);
- fn set_authorized(e: Env, id: Address, authorize: bool, operator: Address);
- fn mint(e: Env, to: Address, amount: i128, operator: Address);
- fn clawback(e: Env, from: Address, amount: i128, operator: Address);
-}
-----
-
-=== Example Implementation
-
-Here's a simplified example of a SAC Admin Wrapper contract using the OpenZeppelin access control library:
-
-[source,rust]
-----
-#[contract]
-pub struct ExampleContract;
-
-#[contractimpl]
-impl ExampleContract {
- pub fn __constructor(
- e: &Env,
- default_admin: Address,
- manager1: Address,
- manager2: Address,
- sac: Address,
- ) {
- access_control::set_admin(e, &default_admin);
-
- // create a role "manager" and grant it to `manager1`
- access_control::grant_role_no_auth(e, &default_admin, &manager1, &symbol_short!("manager"));
-
- // grant it to `manager2`
- access_control::grant_role_no_auth(e, &default_admin, &manager2, &symbol_short!("manager"));
-
- fungible::sac_admin_wrapper::set_sac_address(e, &sac);
- }
-}
-
-#[contractimpl]
-impl SACAdminWrapper for ExampleContract {
- #[only_admin]
- fn set_admin(e: Env, new_admin: Address, _operator: Address) {
- fungible::sac_admin_wrapper::set_admin(&e, &new_admin);
- }
-
- #[only_role(operator, "manager")]
- fn set_authorized(e: Env, id: Address, authorize: bool, operator: Address) {
- fungible::sac_admin_wrapper::set_authorized(&e, &id, authorize);
- }
-
- #[only_role(operator, "manager")]
- fn mint(e: Env, to: Address, amount: i128, operator: Address) {
- fungible::sac_admin_wrapper::mint(&e, &to, amount);
- }
-
- #[only_role(operator, "manager")]
- fn clawback(e: Env, from: Address, amount: i128, operator: Address) {
- fungible::sac_admin_wrapper::clawback(&e, &from, amount);
- }
-}
-----
-
-=== Integration with Access Control
-
-The wrapper approach works particularly well with the OpenZeppelin access control library, allowing for role-based access control to be applied to each admin function:
-
-* `#[only_admin]`: Restricts the function to be called only by the admin
-* `#[only_role(operator, "manager")]`: Restricts the function to be called only by addresses with the "manager" role
-
-== Benefits and Trade-offs
-
-=== Benefits
-
-* Simpler to implement compared to the generic approach
-* More flexible in terms of function-specific authorization
-* Works well with role-based access control
-* Clear separation of concerns
-
-=== Trade-offs
-
-* Requires additional entry points for each admin function
-* Splits user-facing and admin interfaces
-* May require more code for complex authorization scenarios
-
-== Full Example
-
-A complete example implementation can be found in the https://github.com/OpenZeppelin/stellar-contracts/tree/main/examples/sac-admin-wrapper[sac-admin-wrapper example].
-
-== See Also
-
-* xref:tokens/fungible/sac-admin-generic.adoc[SAC Admin Generic]
-* xref:tokens/fungible/fungible.adoc[Fungible Token]
diff --git a/docs/modules/ROOT/pages/tokens/non-fungible/nft-consecutive.adoc b/docs/modules/ROOT/pages/tokens/non-fungible/nft-consecutive.adoc
deleted file mode 100644
index 77f0d043..00000000
--- a/docs/modules/ROOT/pages/tokens/non-fungible/nft-consecutive.adoc
+++ /dev/null
@@ -1,61 +0,0 @@
-:source-highlighter: highlight.js
-:highlightjs-languages: rust
-:github-icon: pass:[]
-= Non-Fungible Consecutive
-
-https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/tokens/src/non-fungible/extensions/consecutive[Source Code]
-
-Consecutive extension for xref:tokens/non-fungible/non-fungible.adoc[Non-Fungible Token] is useful
-for efficiently minting multiple tokens in a single transaction. This can significantly
-reduce costs and improve performance when creating a large number of tokens at once.
-
-== Usage
-
-We'll continue with the xref:tokens/non-fungible/non-fungible.adoc#usage[example] from *Non-Fungible Token*
-and modify the contract so that now batches of tokens can be minted with each call
-to `award_items`. Please note any account can call `award_items` and we might want to
-implement access control to restrict who can mint.
-
-
-[source,rust]
-----
-use soroban_sdk::{contract, contractimpl, Address, Env, String};
-use stellar_macros::default_impl;
-use stellar_tokens::non_fungible::{
- consecutive::{Consecutive, NonFungibleConsecutive},
- Base, ContractOverrides, NonFungibleToken,
-};
-
-#[contract]
-pub struct GameItem;
-
-#[contractimpl]
-impl GameItem {
- pub fn __constructor(e: &Env) {
- Base::set_metadata(
- e,
- String::from_str(e, "www.mygame.com"),
- String::from_str(e, "My Game Items Collection"),
- String::from_str(e, "MGMC"),
- );
- }
-
- pub fn award_items(e: &Env, to: Address, amount: u32) -> u32 {
- // access control might be needed
- Consecutive::batch_mint(e, &to, amount)
- }
-
- pub fn burn(e: &Env, from: Address, token_id: u32) {
- Consecutive::burn(e, &from, token_id);
- }
-}
-
-#[default_impl]
-#[contractimpl]
-impl NonFungibleToken for GameItem {
- type ContractType = Consecutive;
-}
-
-// no entry-point functions required, marker impl
-impl NonFungibleConsecutive for GameItem {}
-----
diff --git a/docs/modules/ROOT/pages/tokens/non-fungible/nft-enumerable.adoc b/docs/modules/ROOT/pages/tokens/non-fungible/nft-enumerable.adoc
deleted file mode 100644
index 28fe9ee0..00000000
--- a/docs/modules/ROOT/pages/tokens/non-fungible/nft-enumerable.adoc
+++ /dev/null
@@ -1,69 +0,0 @@
-:source-highlighter: highlight.js
-:highlightjs-languages: rust
-:github-icon: pass:[]
-= Non-Fungible Enumerable
-
-https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/tokens/src/non-fungible/extensions/enumerable[Source Code]
-
-Enumerable extension for xref:tokens/non-fungible/non-fungible.adoc[Non-Fungible Token] allows for enumeration
-of all the token IDs in the contract as well as all the token IDs owned by each account. This is
-useful for applications that need to list or iterate over tokens, such as marketplaces or wallets.
-
-== Usage
-
-We'll build on the xref:tokens/non-fungible/non-fungible.adoc#usage[example] from *Non-Fungible Token*
-and modify the contract so that all tokens an address own can be listed. Please note any account
-can call `award_item` and we might want to implement access control to restrict who can mint.
-
-[source,rust]
-----
-use soroban_sdk::{contract, contractimpl, Address, Env, String};
-use stellar_macros::default_impl;
-use stellar_tokens::non_fungible::{
- enumerable::{Enumerable, NonFungibleEnumerable},
- Base, ContractOverrides, NonFungibleToken,
-};
-
-#[contract]
-pub struct GameItem;
-
-#[contractimpl]
-impl GameItem {
- pub fn __constructor(e: &Env) {
- Base::set_metadata(
- e,
- String::from_str(e, "www.mygame.com"),
- String::from_str(e, "My Game Items Collection"),
- String::from_str(e, "MGMC"),
- );
- }
-
- pub fn award_item(e: &Env, to: Address) -> u32 {
- // access control might be needed
- Enumerable::sequential_mint(e, &to)
- }
-
- pub fn burn(e: &Env, from: Address, token_id: u32) {
- Enumerable::sequential_burn(e, &from, token_id);
- }
-}
-
-#[default_impl]
-#[contractimpl]
-impl NonFungibleToken for GameItem {
- type ContractType = Enumerable;
-}
-
-#[default_impl]
-#[contractimpl]
-impl NonFungibleEnumerable for GameItem {}
-----
-
-The extension exposes additionally the following entry-point functions, automatically implemented by `#[default_impl]`:
-
-[source,rust]
-----
-fn total_supply(e: &Env) -> u32;
-fn get_owner_token_id(e: &Env, owner: Address, index: u32) -> u32;
-fn get_token_id(e: &Env, index: u32) -> u32;
-----
diff --git a/docs/modules/ROOT/pages/tokens/non-fungible/non-fungible.adoc b/docs/modules/ROOT/pages/tokens/non-fungible/non-fungible.adoc
deleted file mode 100644
index 026d73b6..00000000
--- a/docs/modules/ROOT/pages/tokens/non-fungible/non-fungible.adoc
+++ /dev/null
@@ -1,110 +0,0 @@
-:source-highlighter: highlight.js
-:highlightjs-languages: rust
-:github-icon: pass:[]
-= Non-Fungible Token
-
-https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/tokens/src/non-fungible[Source Code]
-
-In the world of digital assets, not all tokens are alike. This becomes important in situations
-like *real estate*, *voting rights*, or *collectibles*, where some items are valued more than
-others due to their usefulness, rarity, etc.
-On Stellar, you can create non-fungible tokens (NFTs), where each token is unique and
-represents something distinct, with ownership tracked through Soroban smart contracts.
-
-== Overview
-
-The https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/tokens/src/non-fungible[non-fungible] module
-provides three different NFT variants that differ in how certain features like ownership tracking,
-token creation and destruction are handled:
-
-1. *Base*: Contract variant that implements the base logic for the NonFungibleToken interface. Suitable for most use cases.
-2. *Consecutive*: Contract variant for optimized minting of batches of tokens. Builds on top of the base variant, and overrides the necessary functions from the `Base` variant.
-3. *Enumerable*: Contract variant that allows enumerating the tokens on-chain. Builds on top of the base variant, and overrides the necessary functions from the `Base` variant.
-
-These three variants share core functionality and a common interface, exposing identical contract functions as
-entry-points. However, composing custom flows must be handled with extra caution. That is required because of the
-incompatible nature between the business logic of the different NFT variants or the need to wrap the base
-functionality with additional logic.
-
-== Usage
-
-We'll use an NFT to track game items, each having their own unique attributes. Whenever one is to be
-awarded to a player, it will be minted and sent to them. Players are free to keep or burn their token or
-trade it with other people as they see fit. Please note any account can call `award_item` and we might
-want to implement access control to restrict who can mint.
-
-Here's what a contract for tokenized items might look like:
-
-[source,rust]
-----
-use soroban_sdk::{contract, contractimpl, Address, Env, String};
-use stellar_macros::default_impl;
-use stellar_tokens::non_fungible::{
- burnable::NonFungibleBurnable,
- Base, ContractOverrides, NonFungibleToken,
-};
-
-#[contract]
-pub struct GameItem;
-
-#[contractimpl]
-impl GameItem {
- pub fn __constructor(e: &Env) {
- Base::set_metadata(
- e,
- String::from_str(e, "www.mygame.com"),
- String::from_str(e, "My Game Items Collection"),
- String::from_str(e, "MGMC"),
- );
- }
-
- pub fn award_item(e: &Env, to: Address) -> u32 {
- // access control might be needed
- Base::sequential_mint(e, &to)
- }
-}
-
-#[default_impl]
-#[contractimpl]
-impl NonFungibleToken for GameItem {
- type ContractType = Base;
-}
-
-#[default_impl]
-#[contractimpl]
-impl NonFungibleBurnable for GameItem {}
-----
-
-== Extensions
-
-The following optional extensions are provided to enhance capabilities:
-
-=== - Burnable
-https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/tokens/src/non-fungible/extensions/burnable[Source Code]
-
-The `NonFungibleBurnable` trait extends the `NonFungibleToken` trait to provide the capability to burn tokens.
-
-=== - Consecutive
-https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/tokens/src/non-fungible/extensions/consecutive[Source Code]
-
-The `NonFungibleConsecutive` extension is optimized for batch minting of tokens with consecutive IDs. This approach drastically reduces storage writes during minting by storing ownership only at boundaries and inferring ownership for other tokens. See xref:tokens/non-fungible/nft-consecutive.adoc[Non-Fungible Consecutive] for detailed documentation.
-
-This extension is build around the contract variant `Consecutive`. Here is an example usage:
-
-* xref:tokens/non-fungible/nft-consecutive.adoc[Non-Fungible Consecutive]
-
-=== - Enumerable
-https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/tokens/src/non-fungible/extensions/enumerable[Source Code]
-
-The `NonFungibleEnumerable` extension enables on-chain enumeration of tokens owned by an address. See xref:tokens/non-fungible/nft-enumerable.adoc[Non-Fungible Enumerable] for detailed documentation.
-
-This extension is build around the contract variant `Enumerable`. Here is an example usage:
-
-* xref:tokens/non-fungible/nft-enumerable.adoc[Non-Fungible Enumerable]
-
-=== - Royalties
-https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/tokens/src/non-fungible/extensions/royalties[Source Code]
-
-The `NonFungibleRoyalties` trait extends the `NonFungibleToken` trait to provide royalty information for tokens, similar to ERC-2981 standard. This allows marketplaces to query royalty information and pay appropriate fees to creators.
-
-Note: The royalties extension allows both collection-wide default royalties and per-token royalty settings.
diff --git a/docs/modules/ROOT/pages/utils/crypto.adoc b/docs/modules/ROOT/pages/utils/crypto.adoc
deleted file mode 100644
index 5b0c0514..00000000
--- a/docs/modules/ROOT/pages/utils/crypto.adoc
+++ /dev/null
@@ -1,209 +0,0 @@
-:source-highlighter: highlight.js
-:highlightjs-languages: rust
-:github-icon: pass:[]
-= Cryptography Utilities
-
-https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/contract-utils/src/crypto[Crypto Source Code] |
-https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/contract-utils/src/merkle-distributor[Merkle Distributor Source Code]
-
-== Overview
-
-The Cryptography Utilities provide a set of cryptographic tools for Soroban smart contracts,
-including hash functions, Merkle tree verification, and Merkle-based distribution systems.
-These utilities enable secure data verification and efficient token distribution mechanisms.
-The Cryptography Utilities consist of two main packages:
-
-* Crypto: A set of cryptographic primitives and utilities for Soroban contracts.
-* Merkle Distributor: A system for distributing tokens or other assets using Merkle proofs for verification.
-
-== Crypto Package
-
-The crypto package provides fundamental cryptographic primitives and utilities for Soroban contracts,
-with a focus on hashing and Merkle tree operations.
-
-=== Key Components
-
-==== Hashers
-
-Provides a generic `Hasher` trait and implementations for common hash functions:
-
-* `Sha256`: Implementation of the SHA-256 hash function
-* `Keccak256`: Implementation of the Keccak-256 hash function (used in Ethereum)
-
-Each hasher follows the same interface:
-
-[source,rust]
-----
-pub trait Hasher {
- type Output;
-
- fn new(e: &Env) -> Self;
- fn update(&mut self, input: Bytes);
- fn finalize(self) -> Self::Output;
-}
-----
-
-==== Hashable
-
-The `Hashable` trait allows types to be hashed with any `Hasher` implementation:
-
-[source,rust]
-----
-pub trait Hashable {
- fn hash(&self, hasher: &mut H);
-}
-----
-
-Built-in implementations are provided for `BytesN<32>` and `Bytes`.
-
-==== Utility Functions
-
-* `hash_pair`: Hashes two values together
-* `commutative_hash_pair`: Hashes two values in a deterministic order (important for Merkle trees)
-
-==== Merkle Tree Verification
-
-The `Verifier` struct provides functionality to verify Merkle proofs:
-
-[source,rust]
-----
-impl Verifier
-where
- H: Hasher