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
10 changes: 8 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ To build and test the smart contracts, you will need:

- [Rust](https://www.rust-lang.org/tools/install) (latest stable version, at least 1.75+)
- [Soroban CLI](https://soroban.stellar.org/docs/getting-started/setup#install-the-soroban-cli)
- `wasm32-unknown-unknown` target: `rustup target add wasm32-unknown-unknown`
- `wasm32v1-none` target: `rustup target add wasm32v1-none`

> **Note:** This project uses `wasm32v1-none` (not the legacy `wasm32-unknown-unknown`).
> The `wasm32v1-none` target is required by Soroban SDK v20+ and produces smaller WASM
> binaries with lower deployment costs. If you are using an older Soroban CLI (< v20),
> you will need `wasm32-unknown-unknown` instead. CI and local builds must use the same
> target for artifact compatibility.

## How Can I Contribute?

Expand Down Expand Up @@ -55,7 +61,7 @@ Enhancement suggestions are welcome! Please open an issue using the Feature Requ
Build all contracts to WASM:

```bash
cargo build --target wasm32-unknown-unknown --release
cargo build --target wasm32v1-none --release
```

### Testing
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Get up and running in minutes:

1. **Install Prerequisites**:
```bash
rustup target add wasm32-unknown-unknown
rustup target add wasm32v1-none
cargo install --locked soroban-cli
```
2. **Clone & Build**:
Expand Down Expand Up @@ -146,7 +146,7 @@ ecotask-contracts/
cargo install --locked soroban-cli

# Add the WebAssembly target
rustup target add wasm32-unknown-unknown
rustup target add wasm32v1-none
```

### Build
Expand All @@ -157,11 +157,11 @@ git clone https://github.com/ecotask-network/ecotask-contracts.git
cd ecotask-contracts

# Build all contracts
cargo build --target wasm32-unknown-unknown --release
cargo build --target wasm32v1-none --release

# Build a specific contract
cd contracts/eco-token
cargo build --target wasm32-unknown-unknown --release
cargo build --target wasm32v1-none --release
```

### Test
Expand All @@ -186,7 +186,7 @@ soroban network add testnet \

# Deploy the ECO token contract
soroban contract deploy \
--wasm target/wasm32-unknown-unknown/release/eco_token.wasm \
--wasm target/wasm32v1-none/release/eco_token.wasm \
--network testnet \
--source YOUR_SECRET_KEY

Expand Down
4 changes: 2 additions & 2 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ set -euo pipefail

CONTRACT_NAME="${1:?Usage: deploy.sh <contract-name> <network>}"
NETWORK="${2:-testnet}"
WASM="target/wasm32-unknown-unknown/release/${CONTRACT_NAME//-/_}.wasm"
WASM="target/wasm32v1-none/release/${CONTRACT_NAME//-/_}.wasm"

if [ ! -f "$WASM" ]; then
echo "Error: WASM file not found at $WASM"
echo "Build first: cargo build --target wasm32-unknown-unknown --release -p $CONTRACT_NAME"
echo "Build first: cargo build --target wasm32v1-none --release -p $CONTRACT_NAME"
exit 1
fi

Expand Down
Loading