2024-07-23 17:40:34 +00:00
|
|
|
WASMD_VERSION?=v0.44.0
|
|
|
|
ORG?=informaldev
|
|
|
|
IMAGE?=$(ORG)/wasmd
|
|
|
|
.DEFAULT_GOAL := build
|
|
|
|
|
|
|
|
build:
|
|
|
|
docker build \
|
|
|
|
--build-arg="WASMD_VERSION=$(WASMD_VERSION)" \
|
|
|
|
-t $(IMAGE):$(WASMD_VERSION) \
|
|
|
|
.
|
|
|
|
.PHONY: build
|
|
|
|
|
|
|
|
run: build
|
|
|
|
docker run --rm -it \
|
|
|
|
-p 26657:26657 -p 26656:26656 -p 1317:1317 -p 9090:9090 \
|
|
|
|
--mount type=volume,source=wasmd_data,target=/root \
|
|
|
|
--name wasmd \
|
|
|
|
$(ORG)/wasmd:$(WASMD_VERSION)
|
|
|
|
.PHONY: run
|
|
|
|
|
|
|
|
# The create-accounts and delete-accounts commands are exclusively for local use
|
|
|
|
# to refresh the accounts in ./accounts/
|
|
|
|
#
|
|
|
|
# Both targets require that the correct version of wasmd be installed locally.
|
2024-08-01 22:31:52 +00:00
|
|
|
create-local-accounts:
|
2024-07-23 17:40:34 +00:00
|
|
|
mkdir -p ./accounts
|
|
|
|
wasmd keys add admin > ./accounts/admin.txt 2>&1
|
|
|
|
wasmd keys add alice > ./accounts/alice.txt 2>&1
|
|
|
|
wasmd keys add bob > ./accounts/bob.txt 2>&1
|
|
|
|
wasmd keys add charlie > ./accounts/charlie.txt 2>&1
|
|
|
|
.PHONY: create-accounts
|
|
|
|
|
2024-08-01 22:31:52 +00:00
|
|
|
delete-local-accounts:
|
2024-07-23 17:40:34 +00:00
|
|
|
wasmd keys delete -y admin
|
|
|
|
wasmd keys delete -y alice
|
|
|
|
wasmd keys delete -y bob
|
|
|
|
wasmd keys delete -y charlie
|
2024-07-29 13:35:11 +00:00
|
|
|
.PHONY: delete-accounts
|
|
|
|
|
|
|
|
# Imports the accounts for admin, alice, bob and charlie from the text files in
|
|
|
|
# the ./accounts/ folder. We assume that the mnemonic for each account is the
|
|
|
|
# last line of each of the text files.
|
2024-08-01 22:31:52 +00:00
|
|
|
import-local-accounts:
|
2024-07-29 13:35:11 +00:00
|
|
|
tail -n 1 accounts/admin.txt | wasmd keys add admin --recover --keyring-backend=test
|
|
|
|
tail -n 1 accounts/alice.txt | wasmd keys add alice --recover --keyring-backend=test
|
|
|
|
tail -n 1 accounts/bob.txt | wasmd keys add bob --recover --keyring-backend=test
|
|
|
|
tail -n 1 accounts/charlie.txt | wasmd keys add charlie --recover --keyring-backend=test
|
|
|
|
.PHONY: import-accounts
|