cosmwasm-contract

Scaffold CosmWasm contracts with modular domain, services, and gateway layers.

124|19|Updated Jul 11, 2022
One-click install
npx skills add https://github.com/axone-protocol/contracts --skill cosmwasm-contract
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cosmwasm-contract
Source: https://github.com/axone-protocol/contracts/tree/main/.agents/skills/cosmwasm-contract
Command: npx skills add https://github.com/axone-protocol/contracts --skill cosmwasm-contract

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a clear blueprint for structuring CosmWasm contracts, enabling scalable architecture and maintainable codebases within the AXONE ecosystem.

Core Features & Use Cases

  • Contract skeletons and wiring: guides the division of responsibilities across domain, services, and gateway layers.
  • Module metadata and replies: describes how to wire AppContract metadata and reply flows for on-chain interactions.
  • Best-practice organization: presents preferred folder structures (contracts/, src/, tests/) and naming conventions to accelerate onboarding and refactoring.

Quick Start

Create a minimal CosmWasm contract folder following the provided skeleton and adapt it to your contract's domain model.

Frequently Asked Questions about cosmwasm-contract

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a CosmWasm contract for scalable architecture?

To structure a CosmWasm contract, divide responsibilities across domain, services, and gateway layers. This layered architecture separates business logic from on-chain interactions, ensuring maintainable and scalable contract codebases within the AXONE ecosystem.

What is the best way to scaffold a Rust-based CosmWasm contract?

The best way to scaffold a CosmWasm contract is using a modular skeleton with explicit module metadata and AppContract wiring. Adopt preferred folder structures like contracts/, src/, and tests/ to accelerate onboarding and streamline refactoring.

How does AppContract wiring handle replies for CosmWasm on-chain interactions?

AppContract wiring handles replies by defining explicit module metadata and reply flows. This structured routing manages on-chain interactions systematically within the gateway layer, isolating external communication from core domain logic.

Do I need specific folder structures for CosmWasm contract development in the AXONE ecosystem?

Yes, adopting preferred folder structures like contracts/, src/, and tests/ is required for AXONE ecosystem development. These naming conventions accelerate onboarding and satisfy requirements for explicit module metadata and layered architecture.

Can I use this layered architecture approach to refactor existing CosmWasm contracts?

Yes, you can apply this modular architecture to refactor existing CosmWasm contracts. The blueprint guides the division of responsibilities across domain, services, and gateway layers to restructure codebases for better maintainability.

When should I not use a layered domain and gateway architecture for blockchain contracts?

You should avoid layered domain and gateway architectures for minimal or single-purpose blockchain contracts where explicit module metadata and AppContract wiring introduce unnecessary structural overhead, outweighing the benefits of modular separation.