Repository navigation
Conclusion
SmartContract is a full-stack smart contract validation platform built to address a real gap in the CosmWasm developer toolchain. The project delivers:
- A Rust-based HTTP server (
/api/validate) that accepts Solidity (.sol) and CosmWasm (.wasm) uploads with chain-aware validation paths - A Next.js (TypeScript/React) web frontend that provides a browser-based drag-and-drop validation experience
- A CLI workflow via
curlfor automated and scripted use cases -
Structured JSON responses (
valid,message,size_bytes) suitable for both human reading and programmatic consumption -
Test fixtures (a valid and an intentionally invalid
.wasm) bundled in the repository for immediate testing
The system runs entirely locally with no external blockchain infrastructure required, making it fast, offline-capable, and easy to set up.
- Rust for web services: Building a production-grade REST API in Rust requires a deeper understanding of ownership, lifetimes, and async programming than equivalent work in Node.js or Python — but the performance and memory safety benefits are significant.
- Full-stack ownership: Owning both the backend API design and the frontend integration end-to-end revealed how important clear API contracts (the JSON response schema) are for reducing friction between layers.
-
The value of test fixtures: Shipping
invalid.wasmalongsidecounter_contract.wasmfrom day one made testing dramatically faster and revealed edge cases in error message formatting early. - CosmWasm internals: Reading CosmWasm source code to understand its validation rules provided a much deeper understanding of the Cosmos ecosystem than documentation alone would have.
- CORS in local development: Cross-origin issues between co-located frontend and backend are a common gotcha in full-stack development and require deliberate configuration even in local environments.
The SmartContract project successfully demonstrates a working, end-to-end smart contract validation pipeline. Both validation paths (valid and invalid contracts) function correctly via CLI and web UI. The project is well-documented, reproducible from a fresh clone in under 10 minutes, and provides a foundation that can be extended toward deployment integration, multi-platform support, and CI/CD tooling.
Repository: https://github.com/JustSid26/SmartContract
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.