Skip to content

Scaffold contextmem Move package (Move.toml, module stubs) + CI build/test + testnet publish #8

Description

@harrymove-ctrl

Context

ContextMEM has zero Move code todayfind for Move.toml/*.move returns nothing, and every "on-chain" touch is a read-only Sui query (packages/walrus/src/proof.ts uses SuiGrpcClient.getObject against Mysten's Walrus Sites package) or a third-party-signed write (Tatum, MemWal). This is the literal "where is my smart contract?" gap. Per roadmap §2, the answer is one minimal contextmem Move package (registry + receipt). This issue stands up the package skeleton and its CI so the two real modules (separate issues) have somewhere to live and a repeatable publish path.

Goal / user story

As a contributor, I can run sui move build / sui move test locally and in CI, and publish the package to Sui testnet with a single workflow run that records the resulting packageId, so downstream modules and the TS client have a stable on-chain address to target.

Acceptance criteria

  • New top-level move/contextmem/ package (sibling to packages/ and apps/) with Move.toml (edition 2024.beta, named address contextmem = "0x0", Sui framework dep pinned to a testnet rev) and a sources/ dir.
  • Compiling stub modules sources/registry.move and sources/receipt.move (empty module contextmem::registry {} / ::receipt {} is enough) plus a tests/ dir wired so sui move test runs green.
  • New CI workflow .github/workflows/move.yml that installs the Sui CLI and runs sui move build + sui move test on every PR touching move/** (the existing bun-check.yml is JS-only and must NOT be overloaded).
  • A workflow_dispatch (manual) job in the same workflow publishes to testnet using a SUI_TESTNET_PRIVATE_KEY repo secret + testnet faucet gas, and writes the published packageId to move/contextmem/published.testnet.json (uploaded as an artifact).
  • move/contextmem/README.md documents local build, the named-address/upgrade-cap conventions, and the signer/network decision (see notes).
  • Root package.json gains a move:build script (sui move build --path move/contextmem) so the toolchain is discoverable from the monorepo.

Implementation notes

  • Toolchain: pin a Sui CLI version in CI (download a MystenLabs/sui testnet release binary, or suiup); do NOT use cargo install (too slow). Cache the binary.
  • Network: publish to testnet to match what's already there — WALRUS_NETWORKS.testnet.sitePackage in packages/walrus/src/constants.ts and Harbor's testnet alpha. Roadmap decision docs: add product roadmap (Harbor storage + Talus on-chain direction) #4 (one network for the launch surface) means receipts and the blobs they cite must be co-located; testnet is the choice for the demo.
  • Publish gas: publish needs real testnet SUI from the faucet (Enoki sponsorship covers runtime txs, not the one-time publish). Have the workflow request faucet gas for the publish address before sui client publish --json.
  • Upgrade cap: capture the UpgradeCap object id alongside packageId in published.testnet.json so future module changes can be upgraded, not re-published to a new address.
  • DECISION to record in README (affects all sibling issues): signer + ownership. Runtime mints will be Enoki-sponsored (no SUI balance needed, mirroring Harbor's reserve→sign→finalize), but the sender/signer is the open question — recommended for alpha: a single backend service key (suiprivkey1..., decoded via Ed25519Keypair/decodeSuiPrivateKey) signs, Enoki sponsors gas, and the service key is therefore the on-chain owner of Namespace/Receipt objects (user wallet / zkLogin ownership deferred). Document this so the registry/receipt modules don't assume user-owned objects.

Sui Overflow angle

This is the foundation of the "real Sui-native contract" story — it turns ContextMEM from a consumer of Mysten packages into a publisher of its own on-chain logic, and gives judges a concrete packageId on a testnet explorer. Reproducible CI publish is what lets the team iterate the contract during the hackathon without manual key juggling.

Dependencies

None (this is the gating issue; registry, receipt, and the on-chain TS client all build on it).

Part of the ContextMEM roadmap (#4) • Sui Overflow build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0Demo-blocking: required for a working Sui Overflow demomoveSui Move smart-contract package (registry/receipt)platformBackend platform plumbing: Worker, D1, queues, secrets, meteringsuiSui chain: tx signing, objects, wallet, zkLogin, explorer

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions