Skip to content

Latest commit

 

History

History
68 lines (49 loc) · 2.96 KB

README.md

File metadata and controls

68 lines (49 loc) · 2.96 KB

Cosmwasm Zero to Hero

The Cosmwasm Tutorial

Hey there, this intends to be a guide on writing your first Cosmwasm contract.

I myself learn by doing so that's what this will cover, I'll provide further pointers below if you want to get deep into the semantics of Cosmwasm.

Other articles:

Tools

Build smart contract & gen code

cwtools build code/cw-starter
cwtools gents code/cw-starter -o src/contracts

Step by step how to play with cosmwasm simulation tools

add cw-simulate module

yarn add @oraichain/cw-simulate -D

Features

  • configure multiple host chain environments with chain-specific settings / state
  • multiple simultaneous contract instances can exist per chain
  • chain modules can be simulated through custom user code
  • extensible for further instrumentation via custom middlewares
  • load fork state from running blockhain

NoteBooks

  1. Cosmwasm Starter
  2. Cosmwasm CW20 Contract

Compare to cosmwasm-multitest

feature @oraichain/cw-simulate cw-multitest
multiple contract Yes Yes
blockchain module bank, wasm, ibc bank, wasm
snapshot Yes No
production compatibility compatible with @cosmjs/cosmwasm-startgate Internal use
forking networks Yes No

Compare to hardhat

feature @oraichain/cw-simulate hardhat
multiple contract Yes Yes
blockchain module bank, wasm, ibc evm
snapshot Yes Yes
production compatibility compatible @cosmjs/cosmwasm-startgate compatible ethers.js
forking networks Yes Yes
console.log Using deps.api.debug Yes
Typescript codegen Using @oraichain/cwtools Using @typechain/hardhat