deploy-contract

A command that interactively publishes a Move package to a Sui blockchain network. A Move package is a project containing smart-contract code and its dependencies.

In plain words
What is it for?
Use it to locate and validate a package, build and test it, check gas and network settings, publish it with confirmation, and save deployment details.
Why use it?
It checks the package, tests, network, and available transaction funds before publishing, reducing avoidable deployment errors.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/0x-j/sui-stack-claude-code-plugin/deploy-contract
Clone the repo
git clone --depth 1 https://github.com/0x-j/sui-stack-claude-code-plugin
Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,977 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00018 $0.01977
Opus 5 $0.00009 $0.00988
Sonnet 5 $0.00004 $0.00395
Haiku 4.5 $0.00002 $0.00198

Measured 2d ago against content hash e7b37ed5a359, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

deploy-contract scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/deploy-contract.md · 367 lines

How it starts

The opening of the file, as written. The whole thing — 367 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Deploy Move Contract

Interactively guide the deployment of a Move package to a Sui network. This command performs pre-deployment checks, shows gas estimates, confirms network, and handles the publish process.

What This Command Does

  1. Locates the Move package (from argument or current directory)
  2. Validates package structure and builds
  3. Runs tests to ensure contract works
  4. Checks network configuration
  5. Verifies sufficient gas balance
  6. Shows estimated costs
  7. Publishes package with confirmation
  8. Saves deployment info

Instructions

Step 1: Locate Package

If package path provided as argument, use it. Otherwise:

  1. Check if current directory has Move.toml
  2. If not, search for Move packages in subdirectories
  3. If multiple found, ask user which to deploy
  4. If none found, explain Move package structure and ask for path

Step 2: Validate Package

Check Move.toml exists:

cat [PACKAGE_PATH]/Move.toml

Verify basic structure:

  • Has [package] section with name
  • Has [dependencies] with Sui framework
  • Has sources/ directory with .move files

Read Move.toml to extract:

  • Package name
  • Dependencies
  • Named addresses

Step 3: Build Package

Run build to check for compilation errors:

cd [PACKAGE_PATH]
sui move build

If build fails:

  • Show error messages
  • Suggest user fix compilation errors
  • Abort deployment

If build succeeds:

  • Note: Build successful ✓
  • Proceed to testing

Step 4: Run Tests

Execute test suite:

sui move test

If tests fail:

  • Show which tests failed
  • Ask user: "Tests failed. Deploy anyway? (Not recommended)"
  • If no, abort deployment
  • If yes, proceed with warning

If tests pass:

  • Note: All tests passed ✓
  • Proceed to network check

Step 5: Check Network Configuration

Get active network:

sui client active-env

Show network to user and confirm:

  • "About to deploy to [NETWORK] (testnet/mainnet/devnet)"
  • "Is this correct? [Yes/No]"

Read the full file on GitHub · 367 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 367 lines · 18 tokens per session scan A e7b37ed5a359

Subscribe to this mod's changes

deploy-contract is a command published in the GitHub repository 0x-j/sui-stack-claude-code-plugin (10 stars, last pushed 6mo ago), licensed MIT. It adds 18 tokens to every session and 1,977 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.