Repository navigation
Introduction
Blockchain technology introduced smart contracts — self-executing programs stored on a distributed ledger that automatically enforce agreement logic without a trusted intermediary. Platforms like Ethereum, Cosmos, and NEAR rely heavily on smart contracts for DeFi protocols, DAOs, NFT marketplaces, and cross-chain bridges.
On the CosmWasm platform (used by Cosmos-based blockchains), contracts are compiled to WebAssembly (WASM) binaries. These binaries must conform to strict structural and interface standards before they can be uploaded to a chain. A malformed or non-compliant binary will be rejected at the node level — but only after a developer has already spent time deploying.
The motivation for SmartContract arose from a clear pain point in the Web3 developer workflow:
- Irreversibility of deployment — Unlike traditional software, deployed contracts cannot be patched. Catching errors pre-deployment is critical.
-
Opaque error messages — Blockchain node error responses for bad
.wasmbinaries or malformed Solidity artifacts are often cryptic and hard to debug without deep protocol knowledge. -
Tooling gap — Existing tools (like
cosmwasm-check) are purely CLI-based with no web interface, limiting accessibility for newer developers and teams that prefer visual tooling. - No lightweight local validator — Most validation requires a running testnet node or external RPC, adding infrastructure overhead.
SmartContract addresses all of the above by providing a self-contained, local, API-first validator with a browser UI.
| Tool | Type | Description |
|---|---|---|
cosmwasm-check |
CLI tool | Official CosmWasm binary checker; requires Rust toolchain |
| Remix IDE | Web IDE | Solidity-focused; no WASM/CosmWasm support |
| Hardhat / Foundry | Dev frameworks | Ethereum-specific; compile + test pipelines |
| CosmJS | JS library | Interaction library; no static binary validation |
-
cosmwasm-checkis CLI-only — no REST API, no web interface. - Remix IDE and similar tools are Solidity/EVM-specific and cannot handle CosmWasm
.wasmbinaries. - Most frameworks require a live testnet or node connection, making offline/local validation impossible.
- None of these tools expose a simple
POST /validateHTTP endpoint that CI/CD pipelines or other services can call.
SmartContract introduces a three-layer validation platform:
-
Rust Validation Engine — Leverages
cosmwasm-vmcrate internals to check WASM binary compliance natively, at high speed, with no external network calls. -
REST API Layer — Wraps the validator in a Rust Axum HTTP server (port 3000), exposing
POST /api/validatefor Solidity and CosmWasm file uploads. -
Next.js Web UI — A TypeScript/React frontend (port 3001) that provides a drag-and-drop interface for uploading
.soland.wasmfiles with structured validation results.
This stack enables offline-first, fast, language-agnostic validation accessible to both CLI users and browser users.
The platform also supports Solidity contract workflows in addition to CosmWasm validation.
Users can select the Solidity mode from the frontend validator interface and upload .sol files.
The frontend sends the selected file to the backend validation API through the same user flow.
For Solidity responses, the backend can return compiled artifacts such as ABI and bytecode.
This enables a continuous path from validation to deployment readiness inside one interface.
For Solidity and EVM-compatible deployment, wallet integration is handled through MetaMask. The UI provides a wallet connect button that requests account access from the browser wallet provider. Connected account state is retained in frontend context so deploy actions can use the active address. If no wallet is detected, the UI prevents deployment and prompts the user with a clear error. For CosmWasm workflows, Keplr wallet integration is used with explicit testnet chain configuration.
After successful validation, users can trigger deployment from the file result row in the UI.
For Solidity, deployment uses the returned bytecode and sends a transaction via eth_sendTransaction.
The app then polls transaction receipt status until a contract address is available.
When deployment succeeds, the deployed contract address is displayed in the interface.
For CosmWasm, deployment follows upload and instantiate steps through SigningCosmWasmClient.
This design keeps validation, wallet authorization, and deployment in one cohesive experience.
Deployment actions are intentionally available only for contracts that pass validation first. This gating reduces accidental deployment of malformed or unverified contract artifacts. Wallet-related failures are reported to the user to support quick recovery and retries. Using this combined flow improves developer productivity during local testing and demos.