Skip to content

fix: make soroban contract wasm-safe and stabilize giveaway tests#158

Merged
Kaylahray merged 5 commits intogeevapp:mainfrom
Cedarich:fix/contracts-wasm-tests
Feb 22, 2026
Merged

fix: make soroban contract wasm-safe and stabilize giveaway tests#158
Kaylahray merged 5 commits intogeevapp:mainfrom
Cedarich:fix/contracts-wasm-tests

Conversation

@Cedarich
Copy link
Copy Markdown
Contributor

  • Fix Soroban contract WASM build and giveaway tests

  • Body:

  • Ensure geev-core builds for wasm32-unknown-unknown by:

    • Enabling #![no_std] in the contract crate.
    • Disabling soroban-sdk default features for main dependencies.
    • Keeping soroban-sdk testutils only in dev-dependencies .
  • Switch giveaway contract to use persistent storage instead of instance storage.

  • Add a minimal test contract and register it in tests so storage access runs in a proper contract context.

  • Use env.mock_all_auths() in tests so require_auth passes in the test host.

  • Fix enter_giveaway tests to:

    • Set up giveaway state via env.storage().persistent() inside env.as_contract .
    • Verify success before end time, and panics for post-end and duplicate entries.
      Testing
  • cargo test --workspace

  • cargo build --workspace --target wasm32-unknown-unknown --release

close #149

Copy link
Copy Markdown
Contributor

@Kaylahray Kaylahray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arigato 🙋‍♀️

@Kaylahray Kaylahray merged commit 488d351 into geevapp:main Feb 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Devops] Update the workflow to run contracts

3 participants