Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions docs/tutorial/learning-resources.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Learning Resources

This page contains curated learning resources to help you on your CosmWasm journey. Whether you're just getting started or looking to deepen your knowledge, these resources will help you master smart contract development with CosmWasm.

## Video Tutorials

### LearnWeb3Dev (Odie)

Comprehensive video series covering CosmWasm development from basics to deployment:

**Quick Start & Rust for Smart Contracts**
- 8-video playlist covering fundamentals
- [Watch on YouTube](https://www.youtube.com/watch?v=k55wD8p7AfY&list=PLdXjxuqotg2gahVYpCwfLcaD1ViZgCiQi)

**CosmWasm**
- 6 videos on core CosmWasm concepts
- [Watch on YouTube](https://www.youtube.com/watch?v=i0ij_eYHJv4&list=PLdXjxuqotg2gI7ZpREJrVMGtvZsG4RjL7)

**Deploying Smart Contracts To Osmosis**
- 5-video playlist for Osmosis deployment
- [Watch on YouTube](https://www.youtube.com/watch?v=MnyuVvdA6n4&list=PLdXjxuqotg2iDzmRQuSfU7MHU0FzSnuO1)

**Deploying Smart Contracts To Neutron**
- 5 videos for Neutron deployment
- [Watch on YouTube](https://www.youtube.com/watch?v=vLkJLUwklYY&list=PLdXjxuqotg2g2lkyPMtXd5chNOo6Lw7ke)

## Interactive Courses

### B9Lab

Comprehensive CosmWasm development course covering smart contract development from the ground up.

- [CosmWasm Course](https://cosmwasm.b9lab.com/)

### Area-52

Advanced training and certification for CosmWasm developers.

- [Area-52 Platform](https://area-52.io/)

## Comprehensive Tutorial Series

### CosmWasm Developer Platform Tutorials

A complete step-by-step series covering CosmWasm development from fundamentals to advanced topics, with 19 progressive tutorials.

- [View Platform Tutorials](./platform/) - Comprehensive hands-on learning path

## Chain-Specific Tutorials

### Neutron

Comprehensive introduction to developing CosmWasm contracts on Neutron.

- [Introduction to CosmWasm on Neutron](https://docs.neutron.org/developers/tutorials/introduction_to_cosmwasm)

## Community

Looking to connect with other CosmWasm developers? Consider joining the CosmWasm community to share knowledge, get help, and collaborate on projects.

## Next Steps

After exploring these resources, check out our [tutorials](./introduction.mdx) to start building your first CosmWasm smart contract.
54 changes: 54 additions & 0 deletions docs/tutorial/platform/01-intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
title: Introduction
description: Introduction to CosmWasm
---

# Introduction

## From smart contracts to CosmWasm

A smart contract is a piece of code that runs automatically in a provable way. The joke is that it is neither smart, as it only does what it is instructed to do, nor a contract, as it is not legally binding.

This originally-abstract concept was made real with the advent of blockchains, and in particular of Ethereum.

On a typical Ethereum platform, anyone is free to deploy a smart contract as long as they have the tokens to do so, and no validators are censoring them. A set of smart contracts plus related off-chain elements has come to be called a decentralized application, or dApp. However, a platform open to all introduces trade-offs, such as congestion that has nothing to do with the success of your application. This is why other platforms introduced the concept of application-specific blockchains, or app-chains for short, most notably the **Interchain**, a constellation of app-chains, most of them built off of the **Cosmos SDK**.

The code that makes a given app-chain, or at least the part that impacts network consensus, can still be considered a smart contract, or a set thereof, as it runs automatically in a provable way. The difference is that to change a piece of code on an app-chain, or to add a new one, you need to make an on-chain proposal and reach consensus over it. This hurdle is in fact one of the points of an app-chain.

Inevitably, this free-for-all / strict-app-chain dichotomy is not perfect, and some app-chains have had a need to reintroduce free (as in free speech, not free beer) smart contracts, for instance to **foster experimentation**. For this to be possible, an app-chain needs to have **components** that impact the network consensus, and that allow the deployment of **Turing-complete smart contracts**. Or at least complete within the limited resources of a blockchain. If these specific components are not present at the genesis of the app-chain, they too need to be introduced like any other with an on-chain proposal. After the relevant proposal has passed, then it becomes possible to deploy _free_ smart contracts.

:::info

This is where **CosmWasm** comes in, as the set of components that allow the deployment of Turing-complete smart contracts.

:::

The **Cosm** part of its name refers to the [Cosmos SDK](https://docs.cosmos.network). So unsurprisingly, the [CosmWasm _module_](https://github.com/CosmWasm/wasmd/tree/main/x/wasm) is a Cosmos SDK module, which may be present at genesis, or may be introduced as part of an upgrade proposal. This module allows any developer, at a minimum, to deploy smart contracts within it, and, more importantly, to have them **interact** with the rest of the app-chain in a controlled and controllable way.

## CosmWasm tool chain

Now that you understand the big picture of what CosmWasm is from the point of view of an app-chain, let's look at it from the point of view of a smart contract developer. To be able to work, as a smart contract developer you need to understand:

* What languages are available.
* What are the interfaces and communication protocols you have to use and follow.
* What resources are available to the deployed smart contract, in this case, app-chain resources.
* What are the tools that will assist you or improve your productivity.

The smart contract language chosen for CosmWasm is [WebAssembly](https://webassembly.org/), which explains the **Wasm** part of its name. WebAssembly is a stack-based binary instruction format associated with a set of low-level instructions. There exist WebAssembly virtual machines (WAVM) that are able to execute this binary, including in Web browsers. If you come from the Java or the Ethereum worlds, these concepts map directly to the JVM/EVM, bytecodes, and Assembly languages.

:::info

As such, the CosmWasm module, runs, connects, and instruments a WebAssembly VM variant, also known as _runtime_, currently [Wasmer](https://github.com/CosmWasm/cosmwasm/blob/main/packages/vm/Cargo.toml#L59). It also instruments it in order to, for instance, meter operations with a gas mechanism as a denial-of-service countermeasure.

:::

And just as in the Ethereum and Java worlds, developers code in higher-level languages, such as Solidity or Java, which are then compiled to their respective bytecodes. For CosmWasm, the currently preferred higher-level language is [**Rust**](https://www.rust-lang.org/).

Rust exists and grows independently of the blockchain world, therefore the larger ecosystem can benefit CosmWasm developers, with important exceptions such as non-deterministic functions. This is why, within CosmWasm's set of components, you can find:

* A set of interfaces that help you code your smart contracts as per the expectations of the CosmWasm module.
* An extensible set of messages defined in Rust that, when serialized and then interpreted by the CosmWasm module, allow your smart contract to communicate with the app-chain's other modules.
* Further libraries to handle storage, testing, and more.
* A compilation target, bytecode optimizer and checker to account for blockchains' particular situation, especially their limited resources.

In addition, given that it is built for the Interchain, CosmWasm is ready for [IBC](https://www.ibcprotocol.dev), the Inter-Blockchain Protocol. Your CosmWasm smart contracts can even exchange messages with other CosmWasm smart contracts, or its own clones, on other app-chains.
Loading