Skip to content

Commit 0a0acd9

Browse files
authored
Merge pull request #117 from OpenZeppelin/stellar-rm-defaultimpl
Stellar: replace deprecated macro
2 parents c5caca7 + 82b6833 commit 0a0acd9

File tree

10 files changed

+79
-143
lines changed

10 files changed

+79
-143
lines changed

content/stellar-contracts/access/access-control.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Access Control
33
---
44

5-
[Source Code](https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/access/src/access-control)
5+
[Source Code](https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/access/src/access_control)
66

77
## Overview
88

content/stellar-contracts/changelog.mdx

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,61 @@
22
title: Changelog
33
---
44

5+
<a id="v0.6.0"></a>
6+
# [v0.6.0](https://github.com/OpenZeppelin/stellar-contracts/releases/tag/v0.6.0) - 2026-01-26
7+
8+
## What's New
9+
10+
* Timelock (governor sub module)
11+
* WAD (fixed point arithmetic)
12+
* Power Function (fixed point arithmetic)
13+
* Fee Forwarder
14+
* Added `get_existing_roles` for Access Control
15+
16+
## What's Changed
17+
18+
* Inconsistencies across mint and caller in https://github.com/OpenZeppelin/stellar-contracts/pull/495
19+
* Use muxed addresses in fungible transfers in https://github.com/OpenZeppelin/stellar-contracts/pull/493
20+
* Renounce admin rejects when transfer in progress in https://github.com/OpenZeppelin/stellar-contracts/pull/502
21+
* Uncaught panics on policy uninstall in https://github.com/OpenZeppelin/stellar-contracts/pull/504
22+
* NFT name and symbol bound for metadata in https://github.com/OpenZeppelin/stellar-contracts/pull/508
23+
* Bound metadata entries in rwa in https://github.com/OpenZeppelin/stellar-contracts/pull/511
24+
* Allowance bug fix in https://github.com/OpenZeppelin/stellar-contracts/pull/513
25+
* Vault consistency fix in https://github.com/OpenZeppelin/stellar-contracts/pull/523
26+
* Contract trait, deprecate `default_impl` macro in https://github.com/OpenZeppelin/stellar-contracts/pull/525
27+
28+
[Changes][v0.6.0]
29+
30+
31+
<a id="v0.5.1"></a>
32+
# [v0.5.1](https://github.com/OpenZeppelin/stellar-contracts/releases/tag/v0.5.1) - 2025-10-31
33+
34+
## What's Changed
35+
36+
* fix the javascript compilation issue for `examples` package https://github.com/OpenZeppelin/stellar-contracts/issues/484 by renaming the generic datakey enum
37+
38+
[Changes][v0.5.1]
39+
40+
41+
<a id="v0.5.0"></a>
42+
# [v0.5.0](https://github.com/OpenZeppelin/stellar-contracts/releases/tag/v0.5.0) - 2025-10-28
43+
44+
## What's Changed
45+
46+
### Major
47+
* Added Real-World Asset token implementation based on ERC-3643 (T-Rex)
48+
* Added Smart Accounts: context-centric framework to compose authorization intents with signers and policies
49+
* Added Token Vault implementation compatible with ERC-4626
50+
51+
### Minor
52+
* Prevent test_snapshots from being checked in; make PRs less noisy in https://github.com/OpenZeppelin/stellar-contracts/pull/335
53+
* Remove cdylib crate type from default-impl-macro-test Cargo.toml in https://github.com/OpenZeppelin/stellar-contracts/pull/468
54+
* Migrate to target wasmv1-none in https://github.com/OpenZeppelin/stellar-contracts/pull/441
55+
* Remove antora docs in https://github.com/OpenZeppelin/stellar-contracts/pull/483
56+
57+
[Changes][v0.5.0]
58+
59+
560
<a id="v0.4.1"></a>
661
# [v0.4.1](https://github.com/OpenZeppelin/stellar-contracts/releases/tag/v0.4.1) - 2025-07-22
762

@@ -102,6 +157,9 @@ In this release, you can find:
102157
[Changes][v0.1.0]
103158

104159

160+
[v0.6.0]: https://github.com/OpenZeppelin/stellar-contracts/compare/v0.5.1...v0.6.0
161+
[v0.5.1]: https://github.com/OpenZeppelin/stellar-contracts/compare/v0.5.0...v0.5.1
162+
[v0.5.0]: https://github.com/OpenZeppelin/stellar-contracts/compare/v0.4.1...v0.5.0
105163
[v0.4.1]: https://github.com/OpenZeppelin/stellar-contracts/compare/v0.4.0...v0.4.1
106164
[v0.4.0]: https://github.com/OpenZeppelin/stellar-contracts/compare/v0.3.0...v0.4.0
107165
[v0.3.0]: https://github.com/OpenZeppelin/stellar-contracts/compare/v0.2.0...v0.3.0

content/stellar-contracts/helpers/default-impl-macro.mdx

Lines changed: 0 additions & 95 deletions
This file was deleted.

content/stellar-contracts/tokens/fungible/fungible.mdx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Here’s what a basic fungible token contract might look like:
3434
use soroban_sdk::{contract, contractimpl, Address, Env, String};
3535
use stellar_tokens::fungible::{burnable::FungibleBurnable, Base, ContractOverrides, FungibleToken};
3636
use stellar_access::ownable::{self as ownable, Ownable};
37-
use stellar_macros::{default_impl, only_owner};
37+
use stellar_macros::only_owner;
3838

3939
#[contract]
4040
pub struct GameCurrency;
@@ -61,14 +61,12 @@ impl GameCurrency {
6161
}
6262
}
6363

64-
#[default_impl]
65-
#[contractimpl]
64+
#[contractimpl(contracttrait)]
6665
impl FungibleToken for GameCurrency {
6766
type ContractType = Base;
6867
}
6968

70-
#[default_impl]
71-
#[contractimpl]
69+
#[contractimpl(contracttrait)]
7270
impl FungibleBurnable for GameCurrency {}
7371
```
7472

content/stellar-contracts/tokens/non-fungible/nft-consecutive.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ implement access control to restrict who can mint.
1717

1818
```rust
1919
use soroban_sdk::{contract, contractimpl, Address, Env, String};
20-
use stellar_macros::default_impl;
2120
use stellar_tokens::non_fungible::{
2221
consecutive::{Consecutive, NonFungibleConsecutive},
2322
Base, ContractOverrides, NonFungibleToken,
@@ -47,8 +46,7 @@ impl GameItem {
4746
}
4847
}
4948

50-
#[default_impl]
51-
#[contractimpl]
49+
#[contractimpl(contracttrait)]
5250
impl NonFungibleToken for GameItem {
5351
type ContractType = Consecutive;
5452
}

content/stellar-contracts/tokens/non-fungible/nft-enumerable.mdx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Non-Fungible Enumerable
33
---
44

5-
[Source Code](https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/tokens/src/non-fungible/extensions/enumerable)
5+
[Source Code](https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/tokens/src/non_fungible/extensions/enumerable)
66

77
Enumerable extension for [Non-Fungible Token](/stellar-contracts/tokens/non-fungible/non-fungible) allows for enumeration
88
of all the token IDs in the contract as well as all the token IDs owned by each account. This is
@@ -16,7 +16,6 @@ can call `award_item` and we might want to implement access control to restrict
1616

1717
```rust
1818
use soroban_sdk::{contract, contractimpl, Address, Env, String};
19-
use stellar_macros::default_impl;
2019
use stellar_tokens::non_fungible::{
2120
enumerable::{Enumerable, NonFungibleEnumerable},
2221
Base, ContractOverrides, NonFungibleToken,
@@ -46,18 +45,16 @@ impl GameItem {
4645
}
4746
}
4847

49-
#[default_impl]
50-
#[contractimpl]
48+
#[contractimpl(contracttrait)]
5149
impl NonFungibleToken for GameItem {
5250
type ContractType = Enumerable;
5351
}
5452

55-
#[default_impl]
56-
#[contractimpl]
53+
#[contractimpl(contracttrait)]
5754
impl NonFungibleEnumerable for GameItem {}
5855
```
5956

60-
The extension exposes additionally the following entry-point functions, automatically implemented by `#[default_impl]`:
57+
The extension exposes additionally the following entry-point functions:
6158

6259
```rust
6360
fn total_supply(e: &Env) -> u32;

content/stellar-contracts/tokens/non-fungible/non-fungible.mdx

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Non-Fungible Token
33
---
44

5-
[Source Code](https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/tokens/src/non-fungible)
5+
[Source Code](https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/tokens/src/non_fungible)
66

77
In the world of digital assets, not all tokens are alike. This becomes important in situations
88
like **real estate**, **voting rights**, or **collectibles**, where some items are valued more than
@@ -12,7 +12,7 @@ represents something distinct, with ownership tracked through Soroban smart cont
1212

1313
## Overview
1414

15-
The [non-fungible](https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/tokens/src/non-fungible) module
15+
The [non-fungible](https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/tokens/src/non_fungible) module
1616
provides three different NFT variants that differ in how certain features like ownership tracking,
1717
token creation and destruction are handled:
1818

@@ -36,7 +36,6 @@ Here’s what a contract for tokenized items might look like:
3636

3737
```rust
3838
use soroban_sdk::{contract, contractimpl, Address, Env, String};
39-
use stellar_macros::default_impl;
4039
use stellar_tokens::non_fungible::{
4140
burnable::NonFungibleBurnable,
4241
Base, ContractOverrides, NonFungibleToken,
@@ -62,14 +61,12 @@ impl GameItem {
6261
}
6362
}
6463

65-
#[default_impl]
66-
#[contractimpl]
64+
#[contractimpl(contracttrait)]
6765
impl NonFungibleToken for GameItem {
6866
type ContractType = Base;
6967
}
7068

71-
#[default_impl]
72-
#[contractimpl]
69+
#[contractimpl(contracttrait)]
7370
impl NonFungibleBurnable for GameItem {}
7471
```
7572

@@ -78,12 +75,12 @@ impl NonFungibleBurnable for GameItem {}
7875
The following optional extensions are provided to enhance capabilities:
7976

8077
### - Burnable
81-
[Source Code](https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/tokens/src/non-fungible/extensions/burnable)
78+
[Source Code](https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/tokens/src/non_fungible/extensions/burnable)
8279

8380
The `NonFungibleBurnable` trait extends the `NonFungibleToken` trait to provide the capability to burn tokens.
8481

8582
### - Consecutive
86-
[Source Code](https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/tokens/src/non-fungible/extensions/consecutive)
83+
[Source Code](https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/tokens/src/non_fungible/extensions/consecutive)
8784

8885
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 [Non-Fungible Consecutive](/stellar-contracts/tokens/non-fungible/nft-consecutive) for detailed documentation.
8986

@@ -92,7 +89,7 @@ This extension is build around the contract variant `Consecutive`. Here is an ex
9289
* [Non-Fungible Consecutive](/stellar-contracts/tokens/non-fungible/nft-consecutive)
9390

9491
### - Enumerable
95-
[Source Code](https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/tokens/src/non-fungible/extensions/enumerable)
92+
[Source Code](https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/tokens/src/non_fungible/extensions/enumerable)
9693

9794
The `NonFungibleEnumerable` extension enables on-chain enumeration of tokens owned by an address. See [Non-Fungible Enumerable](/stellar-contracts/tokens/non-fungible/nft-enumerable) for detailed documentation.
9895

@@ -101,7 +98,7 @@ This extension is build around the contract variant `Enumerable`. Here is an exa
10198
* [Non-Fungible Enumerable](/stellar-contracts/tokens/non-fungible/nft-enumerable)
10299

103100
### - Royalties
104-
[Source Code](https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/tokens/src/non-fungible/extensions/royalties)
101+
[Source Code](https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/tokens/src/non_fungible/extensions/royalties)
105102

106103
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.
107104

content/stellar-contracts/tokens/rwa/rwa.mdx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ Here's what a basic RWA token contract might look like (only the base token cont
107107
```rust
108108
use soroban_sdk::{contract, contractimpl, symbol_short, Address, Env, String};
109109
use stellar_access::access_control::{self as access_control, AccessControl};
110-
use stellar_macros::default_impl;
111110
use stellar_tokens::{
112111
fungible::{Base, FungibleToken},
113112
rwa::{RWAToken, RWA},
@@ -150,20 +149,17 @@ impl RealEstateToken {
150149
}
151150

152151
// Implement the FungibleToken trait with RWA contract type
153-
#[default_impl]
154-
#[contractimpl]
152+
#[contractimpl(contracttrait)]
155153
impl FungibleToken for RealEstateToken {
156154
type ContractType = RWA;
157155
}
158156

159157
// Implement the RWAToken trait for regulatory features
160-
#[default_impl]
161-
#[contractimpl]
158+
#[contractimpl(contracttrait)]
162159
impl RWAToken for RealEstateToken {}
163160

164161
// Implement AccessControl for role-based permissions
165-
#[default_impl]
166-
#[contractimpl]
162+
#[contractimpl(contracttrait)]
167163
impl AccessControl for RealEstateToken {}
168164
```
169165

content/stellar-contracts/tokens/vault/vault.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ To create a vault contract, implement both the `FungibleToken` and `FungibleVaul
167167

168168
```rust
169169
use soroban_sdk::{contract, contractimpl, Address, Env, String};
170-
use stellar_macros::default_impl;
171170
use stellar_tokens::{
172171
fungible::{Base, FungibleToken},
173172
vault::{FungibleVault, Vault},
@@ -196,8 +195,7 @@ impl VaultContract {
196195
}
197196
}
198197

199-
#[default_impl]
200-
#[contractimpl]
198+
#[contractimpl(contracttrait)]
201199
impl FungibleToken for VaultContract {
202200
type ContractType = Vault;
203201

0 commit comments

Comments
 (0)