Skip to content

feat(contracts): TokenTransfer Soroban contract with testnet deploy script#4

Merged
codebestia merged 8 commits into
mainfrom
feat/orm-setup
May 12, 2026
Merged

feat(contracts): TokenTransfer Soroban contract with testnet deploy script#4
codebestia merged 8 commits into
mainfrom
feat/orm-setup

Conversation

@codebestia

Copy link
Copy Markdown
Owner

Summary

  • New token_transfer contract in contracts/contracts/token_transfer/
  • Wraps any SEP-41 token (configured at init time) — does not mint its own token
  • initialize(admin, token_contract) — one-time setup; panics on double-init
  • transfer(from, to, amount, memo) — requires from.require_auth(), delegates to the SEP-41 token, emits a TransferEvent with an optional opaque memo bytes field (for linking to chat message IDs)
  • balance(address) — proxies balance query to the underlying token
  • set_token_contract(new_token) — admin-only token migration escape hatch
  • 6 unit tests using a mock SEP-41 token: init, double-init panic, transfer, balance, zero-amount panic, sender auth check — all passing
  • WASM builds to 9.6K at target/wasm32-unknown-unknown/release/token_transfer.wasm
  • contracts/scripts/deploy_token_transfer.sh — builds, uploads WASM, deploys instance, and calls initialize on testnet via the stellar CLI
  • Added TOKEN_TRANSFER_CONTRACT_ID to .env.example

@codebestia codebestia merged commit 5482052 into main May 12, 2026
1 check failed
codebestia added a commit that referenced this pull request Jun 26, 2026
feat(contracts): TokenTransfer Soroban contract with testnet deploy script
@codebestia codebestia deleted the feat/orm-setup branch July 2, 2026 11:57
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