Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
705 changes: 425 additions & 280 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ categories = ["no-std", "wasm"]
version = "0.6.0"

[workspace.dependencies]
soroban-sdk = "25.0.2"
soroban-sdk = { version = "25.3.0", features = [
"experimental_spec_shaking_v2",
] }
proc-macro2 = "1.0"
proptest = "1"
quote = "1.0"
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,14 @@ Stellar smart contracts are programs written in Rust leveraging the [Soroban SDK
## How To Test/Play With Example Contracts
The below section is based on [Official Stellar Docs](https://developers.stellar.org/docs/build/smart-contracts/getting-started/hello-world). If you are stuck on any of the steps below, or want to dive in deeper, please refer to the official documentation.

Before starting, make sure you have Stellar CLI installed by following the [official installation guide](https://developers.stellar.org/docs/tools/cli/install-cli).

We provide a set of example contracts that demonstrate how to use the library. You can find them in the `examples/` directory. If you want to deploy the example contracts to the testnet and play with them, you can follow the instructions below:
1. `git clone https://github.com/OpenZeppelin/stellar-contracts.git`
2. `cd stellar-contracts/examples`
3. Take a look at the current folder, and select an example contract you are interested in. We will go with the `fungible-pausable` in this guide.
4. `cd fungible-pausable`
5. `cargo build --target wasm32v1-none --release`
5. `stellar contract build`
6. Now, the `target/wasm32v1-none/release/` directory will contain the compiled contracts. In this case, `target/wasm32v1-none/release/fungible_pausable_example.wasm` is the compiled wasm file.
7. Deploying to the testnet is no different than any other contract. You can follow the instructions in the [Stellar documentation](https://developers.stellar.org/docs/build/smart-contracts/getting-started/deploy-to-testnet).

Expand Down
2 changes: 1 addition & 1 deletion packages/contract-utils/src/crypto/test/hashable.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
extern crate std;

use std::{format, vec::Vec};
use std::vec::Vec;

use proptest::prelude::*;
use soroban_sdk::{Bytes, Env};
Expand Down
2 changes: 1 addition & 1 deletion packages/contract-utils/src/crypto/test/keccak.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
extern crate std;

use std::{format, vec, vec::Vec};
use std::{vec, vec::Vec};

use proptest::prelude::*;
use soroban_sdk::{Bytes, Env};
Expand Down
2 changes: 0 additions & 2 deletions packages/contract-utils/src/crypto/test/merkle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

extern crate std;

use std::format;

use hex_literal::hex;
use proptest::{prelude::*, prop_compose};
use soroban_sdk::Env;
Expand Down
2 changes: 1 addition & 1 deletion packages/contract-utils/src/crypto/test/sha256.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
extern crate std;

use std::{format, vec, vec::Vec};
use std::{vec, vec::Vec};

use proptest::prelude::*;
use soroban_sdk::{Bytes, Env};
Expand Down
4 changes: 2 additions & 2 deletions packages/tokens/src/rwa/claim_issuer/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ fn secp256k1_verify_success() {

let sig_slice = signature.to_bytes();
let mut sig = [0u8; 64];
sig.copy_from_slice(sig_slice.as_slice());
sig.copy_from_slice(&sig_slice);

let signature_data = Secp256k1SignatureData {
public_key,
Expand Down Expand Up @@ -375,7 +375,7 @@ fn secp256k1_verify_fails() {

let sig_slice = signature.to_bytes();
let mut sig = [0u8; 64];
sig.copy_from_slice(sig_slice.as_slice());
sig.copy_from_slice(&sig_slice);

let signature_data = Secp256k1SignatureData {
public_key,
Expand Down
Loading