Go to file
Ethan Frey 7c9b48071a
Merge pull request #48 from sikkatech/sunny/46
remove http request in validatebasic
2020-01-23 22:41:53 +01:00
.circleci Disable Docker Layer Caching - not available in plan 2020-01-22 17:57:33 +01:00
.github Search and replace gaiad/cl with wasmd/cli 2019-11-19 22:29:50 +01:00
app Remove print statement 2020-01-21 09:52:19 +01:00
cli_test Search and replace gaiad/cl with wasmd/cli 2019-11-19 22:29:50 +01:00
cmd Wire up wasm module to the application 2019-11-22 18:15:14 +01:00
contrib Search and replace gaiad/cl with wasmd/cli 2019-11-19 22:29:50 +01:00
docker Separated out run_all from run_wasmd to execute as two processes 2020-01-22 15:29:24 +01:00
docs Update testnet doc 2020-01-14 17:19:56 +01:00
lcd_test Search and replace gaiad/cl with wasmd/cli 2019-11-19 22:29:50 +01:00
networks Search and replace gaiad/cl with wasmd/cli 2019-11-19 22:29:50 +01:00
x/wasm remove genesis test 2020-01-23 16:28:29 -05:00
.codecov.yml Initial commit 2019-04-03 02:23:49 +01:00
.gitattributes Merge PR #25: Remove swagger (defined in the SDK) 2019-05-28 09:57:26 -04:00
.gitignore Search and replace gaiad/cl with wasmd/cli 2019-11-19 22:29:50 +01:00
.golangci.yml Merge PR #188: Add linting to CI 2019-11-14 12:04:50 -08:00
CHANGELOG.md Merge pull request #22 from cosmwasm/improve_contract_queries_12 2020-01-15 11:53:29 +01:00
CODE_OF_CONDUCT.md Initial commit 2019-04-03 02:23:49 +01:00
CONTRIBUTING.md Search and replace gaiad/cl with wasmd/cli 2019-11-19 22:29:50 +01:00
Dockerfile Add helpers for CI setup and document 2020-01-22 15:18:11 +01:00
LICENSE Initial commit 2019-04-03 02:23:49 +01:00
Makefile Search and replace gaiad/cl with wasmd/cli 2019-11-19 22:29:50 +01:00
README.md Use cosmwasm/wasmd:manual for docker image 2020-01-22 16:03:51 +01:00
docker-compose.yml Search and replace gaiad/cl with wasmd/cli 2019-11-19 22:29:50 +01:00
dredd.yml Contract test [GET] (#19) 2019-06-08 15:04:45 +01:00
go.mod Contract-to-contract send works 2020-01-21 14:13:36 +01:00
go.sum Contract-to-contract send works 2020-01-21 14:13:36 +01:00
sims.mk Search and replace gaiad/cl with wasmd/cli 2019-11-19 22:29:50 +01:00

README.md

Wasm Zone

CircleCI codecov Go Report Card license LoC

This repository hosts Wasmd, the first implementation of a cosmos zone with wasm smart contracts enabled.

This code was forked from the cosmos/gaia repository and the majority of the codebase is the same as gaia.

Note: Requires Go 1.13+

Compatibility: Last merge from cosmos/gaia was d6dfa141e2ae38a1ff9f53fca8078c0822671b95

Quick Start

make install
make test

if you are using a linux without X or headless linux, look at this article or #31.

To set up a single node testnet, look at the deployment documentation.

If you want to deploy a whole cluster, look at the network scripts.

Dockerized

We provide a docker image to help with test setups. There are two modes to use it

Build: docker build -t cosmwasm/wasmd:manual . or pull from dockerhub

Dev server

Bring up a local node with a test account containing tokens

This is just designed for local testing/CI - DO NOT USE IN PRODUCTION

docker volume rm -f wasmd_data

# pass password (one time) as env variable for setup, so we don't need to keep typing it
# add some addresses that you have private keys for (locally) to give them genesis funds
docker run --rm -it \
    -e PASSWORD=my-secret-password \
    --mount type=volume,source=wasmd_data,target=/root \
    cosmwasm/wasmd:manual ./setup.sh cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6

# This will start both wasmd and wasmcli rest-server, only wasmcli output is shown on the screen
docker run --rm -it -p 26657:26657 -p 26656:26656 -p 1317:1317 \
    --mount type=volume,source=wasmd_data,target=/root \
    cosmwasm/wasmd:manual ./run_all.sh

# view wasmd logs in another shell
docker run --rm -it \
    --mount type=volume,source=wasmd_data,target=/root,readonly \
    cosmwasm/wasmd:manual ./logs.sh

CI

For CI, we want to generate a template one time and save to disk/repo. Then we can start a chain copying the initial state, but not modifying it. This lets us get the same, fresh start every time.

# Init chain and pass addresses so they are non-empty accounts
rm -rf ./template && mkdir ./template
docker run --rm -it \
    -e PASSWORD=my-secret-password \
    --mount type=bind,source=$(pwd)/template,target=/root \
    cosmwasm/wasmd:manual ./setup.sh cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6

sudo chown -R $(id -u):$(id -g) ./template

# FIRST TIME
# bind to non-/root and pass an argument to run.sh to copy the template into /root
# we need wasmd_data volume mount not just for restart, but also to view logs
docker volume rm -f wasmd_data
docker run --rm -it -p 26657:26657 -p 26656:26656 -p 1317:1317 \
    --mount type=bind,source=$(pwd)/template,target=/template \
    --mount type=volume,source=wasmd_data,target=/root \
    cosmwasm/wasmd:manual ./run_all.sh /template

# RESTART CHAIN with existing state
docker run --rm -it -p 26657:26657 -p 26656:26656 -p 1317:1317 \
    --mount type=volume,source=wasmd_data,target=/root \
    cosmwasm/wasmd:manual ./run_all.sh

# view wasmd logs in another shell
docker run --rm -it \
    --mount type=volume,source=wasmd_data,target=/root,readonly \
    cosmwasm/wasmd:manual ./logs.sh