Build production-style OneChain apps end-to-end with minimal back-and-forth: scaffold contracts + frontend, implement requested features, build, deploy, wire IDs, and run. Use when users say build/create/make an app, dApp, contract, dashboard, launchpad, NFT, DeFi, game, or full-stack project on OneChain.
Use this skill when a user asks to build any app on OneChain.
Follow these rules by default:
If the user does not specify alternatives, use:
https://rpc-testnet.onelabs.cc:443https://onescan.cc/testnetedition = "2024.beta")@onelabs/dapp-kit, @mysten/sui, @tanstack/react-querynpmFor a normal "build xyz app on OneChain" task, deliver all of:
PackageID.git clone https://github.com/one-chain-labs/onechain.git
cd onechain
cargo install --path crates/one --locked --features tracing
~/.cargo/bin/one --version
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
one --version
one client new-env --alias testnet --rpc https://rpc-testnet.onelabs.cc:443
one client switch --env testnet
one client active-env
one client new-address ed25519
one client active-address
one client faucet
one client gas
Recommended structure:
<app-name>/
contracts/
Move.toml
sources/
frontend/
[package]
name = "AppContracts"
version = "0.0.1"
edition = "2024.beta"
[addresses]
app = "0x0"
one = "0x2"
[dependencies]
One = { local = "../../onechain/crates/sui-framework/packages/one-framework" }
MoveStdlib = { local = "../../onechain/crates/sui-framework/packages/move-stdlib" }
one:: framework modules.one move build --path contracts
one client publish --gas-budget 50000000 contracts
Capture and persist:
PackageIDnpm create vite@latest frontend -- --template react-ts
npm install --prefix frontend @onelabs/dapp-kit @mysten/sui @tanstack/react-query
frontend/.env:
VITE_NETWORK=testnet
VITE_RPC_URL=https://rpc-testnet.onelabs.cc:443
VITE_PACKAGE_ID=0x<package_id>
VITE_PRIMARY_OBJECT_ID=0x<object_id_if_needed>
QueryClientProvider, chain provider, wallet provider).All conditions must be true:
mkdir -p MyOneApp/contracts/sources
one move build --path MyOneApp/contracts
one client publish --gas-budget 50000000 MyOneApp/contracts
npm create vite@latest MyOneApp/frontend -- --template react-ts
npm install --prefix MyOneApp/frontend @onelabs/dapp-kit @mysten/sui @tanstack/react-query
cd MyOneApp/frontend && npm run dev
If any step fails:
Do not stop at planning unless the user explicitly asks for planning only.