Skip to content

Commit abdd42e

Browse files
brozorecericglau
andauthored
Fix missing no_std in Stellar contracts (#471)
Co-authored-by: Eric Lau <[email protected]>
1 parent d66318f commit abdd42e

File tree

6 files changed

+23
-0
lines changed

6 files changed

+23
-0
lines changed

packages/core/stellar/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 0.1.1 (2025-03-03)
4+
5+
- Add a default no_std to all contracts. ([#471](https://github.com/OpenZeppelin/contracts-wizard/pull/471))
6+
37
## 0.1.0 (2025-02-25)
48

59
- Initial version. ([#460](https://github.com/OpenZeppelin/contracts-wizard/pull/460))

packages/core/stellar/src/contract.test.ts.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Generated by [AVA](https://avajs.dev).
1010
1111
`// SPDX-License-Identifier: MIT␊
1212
// Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊
13+
#![no_std]␊
1314
1415
#[contract]␊
1516
pub struct Foo;␊
@@ -25,6 +26,7 @@ Generated by [AVA](https://avajs.dev).
2526
2627
`// SPDX-License-Identifier: MIT␊
2728
// Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊
29+
#![no_std]␊
2830
2931
#[contract]␊
3032
pub struct Foo;␊
@@ -43,6 +45,7 @@ Generated by [AVA](https://avajs.dev).
4345
4446
`// SPDX-License-Identifier: MIT␊
4547
// Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊
48+
#![no_std]␊
4649
4750
#[contract]␊
4851
pub struct Foo;␊
@@ -61,6 +64,7 @@ Generated by [AVA](https://avajs.dev).
6164
6265
`// SPDX-License-Identifier: MIT␊
6366
// Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊
67+
#![no_std]␊
6468
6569
#[contract]␊
6670
pub struct Foo;␊
@@ -86,6 +90,7 @@ Generated by [AVA](https://avajs.dev).
8690
8791
`// SPDX-License-Identifier: MIT␊
8892
// Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊
93+
#![no_std]␊
8994
9095
#[contract]␊
9196
pub struct Foo;␊
@@ -111,6 +116,7 @@ Generated by [AVA](https://avajs.dev).
111116
112117
`// SPDX-License-Identifier: MIT␊
113118
// Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊
119+
#![no_std]␊
114120
115121
use some::library::SomeLibrary;␊
116122
@@ -128,6 +134,7 @@ Generated by [AVA](https://avajs.dev).
128134
129135
`// SPDX-License-Identifier: MIT␊
130136
// Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊
137+
#![no_std]␊
131138
132139
use some::library::{Misc, SomeLibrary};␊
133140
@@ -145,6 +152,7 @@ Generated by [AVA](https://avajs.dev).
145152
146153
`// SPDX-License-Identifier: MIT␊
147154
// Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊
155+
#![no_std]␊
148156
149157
use another::library::{self as custom1, self as custom2, AnotherLibrary};␊
150158
use some::library::SomeLibrary;␊
6 Bytes
Binary file not shown.

packages/core/stellar/src/fungible.test.ts.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Generated by [AVA](https://avajs.dev).
1010
1111
`// SPDX-License-Identifier: MIT␊
1212
// Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊
13+
#![no_std]␊
1314
1415
use openzeppelin_fungible_token::{self as fungible, FungibleToken};␊
1516
use soroban_sdk::{Address, contract, contractimpl, Env, String, Symbol};␊
@@ -70,6 +71,7 @@ Generated by [AVA](https://avajs.dev).
7071
7172
`// SPDX-License-Identifier: MIT␊
7273
// Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊
74+
#![no_std]␊
7375
7476
use openzeppelin_fungible_token::{␊
7577
self as fungible, burnable::FungibleBurnable, FungibleToken␊
@@ -147,6 +149,7 @@ Generated by [AVA](https://avajs.dev).
147149
148150
`// SPDX-License-Identifier: MIT␊
149151
// Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊
152+
#![no_std]␊
150153
151154
use openzeppelin_fungible_token::{self as fungible, FungibleToken};␊
152155
use openzeppelin_pausable::{self as pausable, Pausable};␊
@@ -251,6 +254,7 @@ Generated by [AVA](https://avajs.dev).
251254
252255
`// SPDX-License-Identifier: MIT␊
253256
// Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊
257+
#![no_std]␊
254258
255259
use openzeppelin_fungible_token::{␊
256260
self as fungible, burnable::FungibleBurnable, FungibleToken␊
@@ -374,6 +378,7 @@ Generated by [AVA](https://avajs.dev).
374378
375379
`// SPDX-License-Identifier: MIT␊
376380
// Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊
381+
#![no_std]␊
377382
378383
use openzeppelin_fungible_token::{␊
379384
self as fungible, FungibleToken, mintable::FungibleMintable␊
@@ -437,6 +442,7 @@ Generated by [AVA](https://avajs.dev).
437442
438443
`// SPDX-License-Identifier: MIT␊
439444
// Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊
445+
#![no_std]␊
440446
441447
use openzeppelin_fungible_token::{self as fungible, FungibleToken};␊
442448
use soroban_sdk::{Address, contract, contractimpl, Env, String, Symbol};␊
@@ -497,6 +503,7 @@ Generated by [AVA](https://avajs.dev).
497503
498504
`// SPDX-License-Identifier: MIT␊
499505
// Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊
506+
#![no_std]␊
500507
501508
use openzeppelin_fungible_token::{␊
502509
self as fungible, FungibleToken, mintable::FungibleMintable␊
@@ -575,6 +582,7 @@ Generated by [AVA](https://avajs.dev).
575582
576583
`// SPDX-License-Identifier: MIT␊
577584
// Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊
585+
#![no_std]␊
578586
579587
use openzeppelin_fungible_token::{self as fungible, FungibleToken};␊
580588
use soroban_sdk::{Address, contract, contractimpl, Env, String, Symbol, symbol_short};␊
@@ -638,6 +646,7 @@ Generated by [AVA](https://avajs.dev).
638646
639647
`// SPDX-License-Identifier: MIT␊
640648
// Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊
649+
#![no_std]␊
641650
642651
use openzeppelin_fungible_token::{␊
643652
self as fungible, burnable::FungibleBurnable, FungibleToken, mintable::FungibleMintable␊
@@ -772,6 +781,7 @@ Generated by [AVA](https://avajs.dev).
772781
773782
`// SPDX-License-Identifier: MIT␊
774783
// Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊
784+
#![no_std]␊
775785
776786
use openzeppelin_fungible_token::{␊
777787
self as fungible, burnable::FungibleBurnable, FungibleToken, mintable::FungibleMintable␊
10 Bytes
Binary file not shown.

packages/core/stellar/src/print.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export function printContract(contract: Contract): string {
1616
[
1717
`// SPDX-License-Identifier: ${contract.license}`,
1818
`// Compatible with OpenZeppelin Stellar Soroban Contracts ${compatibleContractsSemver}`,
19+
`#![no_std]`,
1920
],
2021
spaceBetween(
2122
printUseClauses(contract),

0 commit comments

Comments
 (0)