-
Notifications
You must be signed in to change notification settings - Fork 10
Tutorial
Geunwoo Kim edited this page Jul 9, 2022
·
18 revisions
Prerequisites: https://docs.cosmwasm.com/docs/1.0/getting-started/installation/#installing-rust-in-linux-and-mac
We recommend starting with this tutorial https://docs.cosmwasm.com/dev-academy/develop-smart-contract/develop/.
In the tutorial, we interact with the testnet using wasmd and JS CLI. In our project, we will use cosmr which is Rust cosmos SDK that creates, signs, and sends transactions.
https://docs.junonetwork.io/smart-contracts-and-junod-development/tutorial-erc-20 this tutorial is not good.
https://docs.cosmwasm.com/dev-academy/basics/environment#setup-wasmd-and-wallet
- The original optimizer does not work well in Mac M1. For Mac M1 machine, we need to run the following command.
docker run --rm -v "$(pwd)":/code
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry
cosmwasm/rust-optimizer-arm64:0.12.6
- If the original version of the compiled contract is not optimized following the instruction, it is rejected by the network due to the size limitation (i.e., your contract in
/artifacts
directory should be uploaded).