Skip to content

Commit 969a220

Browse files
brozorecozgunozerk
andauthored
release 0.5.0 (#480)
* update readmes * update cargo version * harmonize error codes in accounts * add audit reports --------- Co-authored-by: Özgün Özerk <ozgunozerk.elo@gmail.com>
1 parent a5fada3 commit 969a220

18 files changed

Lines changed: 112 additions & 102 deletions

Cargo.lock

Lines changed: 29 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ repository = "https://github.com/OpenZeppelin/stellar-contracts"
3737
documentation = "https://docs.openzeppelin.com/stellar-contracts/"
3838
keywords = ["stellar", "soroban", "smart-contracts", "standards"]
3939
categories = ["no-std", "wasm"]
40-
version = "0.4.1"
40+
version = "0.5.0"
4141

4242
[workspace.dependencies]
4343
soroban-sdk = "23.0.2"

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ We recommend pinning to a specific version, because rapid iterations are expecte
5454

5555
```toml
5656
[dependencies]
57-
stellar-tokens = "=0.4.0"
58-
stellar-access = "=0.4.0"
59-
stellar-contract-utils = "=0.4.0"
57+
stellar-tokens = "=0.5.0"
58+
stellar-access = "=0.5.0"
59+
stellar-contract-utils = "=0.5.0"
6060
```
6161

6262
## Notes
348 KB
Binary file not shown.
223 KB
Binary file not shown.

packages/access/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@ Add this to your `Cargo.toml`:
137137
```toml
138138
[dependencies]
139139
# We recommend pinning to a specific version, because rapid iterations are expected as the library is in an active development phase.
140-
stellar-access = "=0.4.0"
140+
stellar-access = "=0.5.0"
141141
# Add this if you want to use macros
142-
stellar-macros = "=0.4.0"
142+
stellar-macros = "=0.5.0"
143143
```
144144

145145
## Examples

packages/accounts/README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,17 @@ create_context_rule(
281281

282282
## Getting Started
283283

284-
### 1. Implement the Smart Account Trait
284+
### 1. Installation
285+
286+
Add this to your `Cargo.toml`:
287+
288+
```toml
289+
[dependencies]
290+
# We recommend pinning to a specific version, because rapid iterations are expected as the library is in an active development phase.
291+
stellar-accounts = "=0.5.0"
292+
```
293+
294+
### 2. Implement the Smart Account Trait
285295

286296
```rust
287297
use stellar_accounts::smart_account::{
@@ -325,7 +335,7 @@ impl CustomAccountInterface for MySmartAccount {
325335
}
326336
```
327337

328-
### 2. Create Context Rules
338+
### 3. Create Context Rules
329339

330340
```rust
331341
// Create an admin rule
@@ -339,7 +349,7 @@ add_context_rule(
339349
);
340350
```
341351

342-
### 3. Add Policies (Optional)
352+
### 4. Add Policies (Optional)
343353

344354
For policies, there are two options:
345355

@@ -361,7 +371,7 @@ add_policy(
361371
);
362372
```
363373

364-
### 4. Choose or Deploy Verifier Contracts (For External Signers)
374+
### 5. Choose or Deploy Verifier Contracts (For External Signers)
365375

366376
For external signers, there are two options:
367377

packages/accounts/src/policies/simple_threshold.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ pub struct SimpleThresholdAccountParams {
7878
#[repr(u32)]
7979
pub enum SimpleThresholdError {
8080
/// The smart account does not have a simple threshold policy installed.
81-
SmartAccountNotInstalled = 2200,
81+
SmartAccountNotInstalled = 3200,
8282
/// When threshold is 0 or exceeds the number of available signers.
83-
InvalidThreshold = 2201,
83+
InvalidThreshold = 3201,
8484
/// The transaction is not allowed by this policy.
85-
NotAllowed = 2202,
85+
NotAllowed = 3202,
8686
}
8787

8888
/// Storage keys for simple threshold policy data.

packages/accounts/src/policies/spending_limit.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,15 @@ pub struct SpendingEntry {
7474
#[repr(u32)]
7575
pub enum SpendingLimitError {
7676
/// The smart account does not have a spending limit policy installed.
77-
SmartAccountNotInstalled = 2220,
77+
SmartAccountNotInstalled = 3220,
7878
/// The spending limit has been exceeded.
79-
SpendingLimitExceeded = 2221,
79+
SpendingLimitExceeded = 3221,
8080
/// The spending limit or period is invalid.
81-
InvalidLimitOrPeriod = 2222,
81+
InvalidLimitOrPeriod = 3222,
8282
/// The transaction is not allowed by this policy.
83-
NotAllowed = 2223,
83+
NotAllowed = 3223,
8484
/// The spending history has reached maximum capacity.
85-
HistoryCapacityExceeded = 2224,
85+
HistoryCapacityExceeded = 3224,
8686
}
8787

8888
/// Storage keys for spending limit policy data.

0 commit comments

Comments
 (0)