Skip to content

Publish Soroban contracts to contrafactory#57

Closed
alex-predicate wants to merge 1 commit intomainfrom
publish-soroban-contracts
Closed

Publish Soroban contracts to contrafactory#57
alex-predicate wants to merge 1 commit intomainfrom
publish-soroban-contracts

Conversation

@alex-predicate
Copy link
Copy Markdown
Contributor

Summary

  • Add publish-soroban job to the publish workflow, running in parallel with the existing Foundry job
  • Builds Soroban WASM contracts and publishes them to contrafactory via the REST API
  • Fixes test-stablecoin being absent from /api/v1/packages?project=predicate-contracts

Details

The existing publish workflow only discovered Foundry/Solidity contracts via contrafactory publish. Soroban contracts (Rust/WASM) were invisible to it, so test-stablecoin never appeared in the registry.

The new job:

  • Builds the soroban/ workspace to wasm32-unknown-unknown
  • Runs tests
  • Iterates over .wasm outputs and POSTs each to the contrafactory API with chain: stellar, builder: soroban
  • Uses jq for safe JSON construction (avoids issues with large hex payloads)
  • Handles 409 (version exists) gracefully, fails on other errors
  • Auto-discovers new contracts added to the Soroban workspace

Test plan

  • Merge and tag a new version (or trigger workflow_dispatch) to verify the Soroban job runs successfully
  • Confirm test-stablecoin appears in /api/v1/packages?project=predicate-contracts

🤖 Generated with Claude Code

The publish workflow only handled Foundry/Solidity contracts, so
Soroban WASM contracts like test-stablecoin were missing from the
contrafactory package registry.

Add a parallel publish-soroban job that builds the Soroban workspace
and publishes each .wasm artifact via the contrafactory REST API.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@alex-predicate
Copy link
Copy Markdown
Contributor Author

Closing — contrafactory doesn't support non-EVM artifacts yet. Will deploy Soroban contracts via scripts for now.

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.

1 participant