diff --git a/packages/core/stellar/CHANGELOG.md b/packages/core/stellar/CHANGELOG.md index d0dfa9868..0631f08cf 100644 --- a/packages/core/stellar/CHANGELOG.md +++ b/packages/core/stellar/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.1.1 (2025-03-03) + +- Add a default no_std to all contracts. ([#471](https://github.com/OpenZeppelin/contracts-wizard/pull/471)) + ## 0.1.0 (2025-02-25) - Initial version. ([#460](https://github.com/OpenZeppelin/contracts-wizard/pull/460)) diff --git a/packages/core/stellar/src/contract.test.ts.md b/packages/core/stellar/src/contract.test.ts.md index a58d43d9f..89ea6d239 100644 --- a/packages/core/stellar/src/contract.test.ts.md +++ b/packages/core/stellar/src/contract.test.ts.md @@ -10,6 +10,7 @@ Generated by [AVA](https://avajs.dev). `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊ + #![no_std]␊ ␊ #[contract]␊ pub struct Foo;␊ @@ -25,6 +26,7 @@ Generated by [AVA](https://avajs.dev). `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊ + #![no_std]␊ ␊ #[contract]␊ pub struct Foo;␊ @@ -43,6 +45,7 @@ Generated by [AVA](https://avajs.dev). `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊ + #![no_std]␊ ␊ #[contract]␊ pub struct Foo;␊ @@ -61,6 +64,7 @@ Generated by [AVA](https://avajs.dev). `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊ + #![no_std]␊ ␊ #[contract]␊ pub struct Foo;␊ @@ -86,6 +90,7 @@ Generated by [AVA](https://avajs.dev). `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊ + #![no_std]␊ ␊ #[contract]␊ pub struct Foo;␊ @@ -111,6 +116,7 @@ Generated by [AVA](https://avajs.dev). `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊ + #![no_std]␊ ␊ use some::library::SomeLibrary;␊ ␊ @@ -128,6 +134,7 @@ Generated by [AVA](https://avajs.dev). `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊ + #![no_std]␊ ␊ use some::library::{Misc, SomeLibrary};␊ ␊ @@ -145,6 +152,7 @@ Generated by [AVA](https://avajs.dev). `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊ + #![no_std]␊ ␊ use another::library::{self as custom1, self as custom2, AnotherLibrary};␊ use some::library::SomeLibrary;␊ diff --git a/packages/core/stellar/src/contract.test.ts.snap b/packages/core/stellar/src/contract.test.ts.snap index b8896e034..ee404b454 100644 Binary files a/packages/core/stellar/src/contract.test.ts.snap and b/packages/core/stellar/src/contract.test.ts.snap differ diff --git a/packages/core/stellar/src/fungible.test.ts.md b/packages/core/stellar/src/fungible.test.ts.md index 297bc2593..da3b8a2b2 100644 --- a/packages/core/stellar/src/fungible.test.ts.md +++ b/packages/core/stellar/src/fungible.test.ts.md @@ -10,6 +10,7 @@ Generated by [AVA](https://avajs.dev). `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊ + #![no_std]␊ ␊ use openzeppelin_fungible_token::{self as fungible, FungibleToken};␊ use soroban_sdk::{Address, contract, contractimpl, Env, String, Symbol};␊ @@ -70,6 +71,7 @@ Generated by [AVA](https://avajs.dev). `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊ + #![no_std]␊ ␊ use openzeppelin_fungible_token::{␊ self as fungible, burnable::FungibleBurnable, FungibleToken␊ @@ -147,6 +149,7 @@ Generated by [AVA](https://avajs.dev). `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊ + #![no_std]␊ ␊ use openzeppelin_fungible_token::{self as fungible, FungibleToken};␊ use openzeppelin_pausable::{self as pausable, Pausable};␊ @@ -251,6 +254,7 @@ Generated by [AVA](https://avajs.dev). `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊ + #![no_std]␊ ␊ use openzeppelin_fungible_token::{␊ self as fungible, burnable::FungibleBurnable, FungibleToken␊ @@ -374,6 +378,7 @@ Generated by [AVA](https://avajs.dev). `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊ + #![no_std]␊ ␊ use openzeppelin_fungible_token::{␊ self as fungible, FungibleToken, mintable::FungibleMintable␊ @@ -437,6 +442,7 @@ Generated by [AVA](https://avajs.dev). `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊ + #![no_std]␊ ␊ use openzeppelin_fungible_token::{self as fungible, FungibleToken};␊ use soroban_sdk::{Address, contract, contractimpl, Env, String, Symbol};␊ @@ -497,6 +503,7 @@ Generated by [AVA](https://avajs.dev). `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊ + #![no_std]␊ ␊ use openzeppelin_fungible_token::{␊ self as fungible, FungibleToken, mintable::FungibleMintable␊ @@ -575,6 +582,7 @@ Generated by [AVA](https://avajs.dev). `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊ + #![no_std]␊ ␊ use openzeppelin_fungible_token::{self as fungible, FungibleToken};␊ use soroban_sdk::{Address, contract, contractimpl, Env, String, Symbol, symbol_short};␊ @@ -638,6 +646,7 @@ Generated by [AVA](https://avajs.dev). `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊ + #![no_std]␊ ␊ use openzeppelin_fungible_token::{␊ self as fungible, burnable::FungibleBurnable, FungibleToken, mintable::FungibleMintable␊ @@ -772,6 +781,7 @@ Generated by [AVA](https://avajs.dev). `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Stellar Soroban Contracts ^0.1.0␊ + #![no_std]␊ ␊ use openzeppelin_fungible_token::{␊ self as fungible, burnable::FungibleBurnable, FungibleToken, mintable::FungibleMintable␊ diff --git a/packages/core/stellar/src/fungible.test.ts.snap b/packages/core/stellar/src/fungible.test.ts.snap index 437da73ab..7fd26b3cb 100644 Binary files a/packages/core/stellar/src/fungible.test.ts.snap and b/packages/core/stellar/src/fungible.test.ts.snap differ diff --git a/packages/core/stellar/src/print.ts b/packages/core/stellar/src/print.ts index 1087b3fa3..360f7da2f 100644 --- a/packages/core/stellar/src/print.ts +++ b/packages/core/stellar/src/print.ts @@ -16,6 +16,7 @@ export function printContract(contract: Contract): string { [ `// SPDX-License-Identifier: ${contract.license}`, `// Compatible with OpenZeppelin Stellar Soroban Contracts ${compatibleContractsSemver}`, + `#![no_std]`, ], spaceBetween( printUseClauses(contract),