# Architecture of Multi-Chain Contracts

CosmWasm is purpose-built to serve as a multi-chain solution for smart contracts, distinctively crafted within the Cosmos ecosystem. Unlike isolated chains, it's tailored for networks of interconnected blockchains. But what precisely does "multi-chain" signify?

## Diverse Chains, Uniform Contracts

All CosmWasm code is deliberately crafted to remain agnostic regarding the specific details of the underlying blockchain. When you develop a CosmWasm contract, it becomes compatible with various chains within the expansive Cosmos ecosystem.

## Inter-Blockchain Contracts

CosmWasm contracts leverage the Inter-Blockchain Communication protocol (IBC), enabling seamless authentication and data exchange between different blockchains. IBC offers an open and permissionless method for transmitting data packets across blockchains, empowering you to write code on one chain that can execute transactions on another. To facilitate this capability, CosmWasm fully adopts the actor model, ensuring that code is inherently designed for IBC utilization. Consequently, messages in CosmWasm operate on a "fire-and-forget" principle, eliminating the need to await promises and mitigating concerns related to race conditions and reentrancy attacks. By incorporating IBC primitives into CosmWasm's libraries, you can unleash the extensive potential of inter-chain messaging and execution.

## Seamless Integration

CosmWasm's design leans towards that of a library rather than a comprehensive framework, resulting in minimal API dependencies. This flexibility empowers you to harness the capabilities of CosmWasm without becoming overly reliant on it.

This approach offers two noteworthy advantages:

1. Simplified Support for Multiple Languages: The design simplifies the process of adding support for multiple programming languages when creating smart contracts.
2. Versatility Beyond Cosmos SDK: Because it imposes minimal requirements on the host system, CosmWasm can be seamlessly integrated into various frameworks, not limited solely to the Cosmos SDK. The core runtime logic, cosmwasm-vm, is coded in Rust, with wasmvm providing a versatile Go binding. This adaptability allows CosmWasm to serve as a robust foundation for your smart contracts and decentralized applications, ensuring they can be effortlessly migrated to different blockchains and programming languages.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.burnt.com/verona/others/archived/cosmwasm-resources/architecture-of-multi-chain-contracts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
