chore: rename the ethermint to chibaclonk

1. rename `ethermint` to `chiba-clonk`

2. fix the `make localnet-start`
This commit is contained in:
Sai Kumar 2022-04-05 21:00:20 +05:30
parent 96393bfc36
commit 548f2a7b92
24 changed files with 269 additions and 252 deletions

View File

@ -5,7 +5,7 @@
## Start server ## Start server
```shell ```shell
./build/ethermintd start --gql-playground --gql-server ./build/chibaclonkd start --gql-playground --gql-server
``` ```
Basic node status: Basic node status:

View File

@ -4,7 +4,7 @@ FROM golang:alpine AS build-env
ENV PACKAGES git build-base ENV PACKAGES git build-base
# Set working directory for the build # Set working directory for the build
WORKDIR /go/src/github.com/tharsis/ethermint WORKDIR /go/src/github.com/vulcanize/chiba-clonk
# Install dependencies # Install dependencies
RUN apk add --update $PACKAGES RUN apk add --update $PACKAGES
@ -24,7 +24,7 @@ RUN apk add --update ca-certificates jq
WORKDIR / WORKDIR /
# Copy over binaries from the build-env # Copy over binaries from the build-env
COPY --from=build-env /go/src/github.com/tharsis/ethermint/build/ethermintd /usr/bin/ethermintd COPY --from=build-env /go/src/github.com/vulcanize/chiba-clonk/build/chibaclonkd /usr/bin/chibaclonkd
# Run ethermintd by default # Run chibaclonkd by default
CMD ["ethermintd"] CMD ["chibaclonkd"]

View File

@ -7,13 +7,14 @@ TMVERSION := $(shell go list -m github.com/tendermint/tendermint | sed 's:.* ::'
COMMIT := $(shell git log -1 --format='%H') COMMIT := $(shell git log -1 --format='%H')
LEDGER_ENABLED ?= true LEDGER_ENABLED ?= true
BINDIR ?= $(GOPATH)/bin BINDIR ?= $(GOPATH)/bin
ETHERMINT_BINARY = ethermintd CHIBACLONK_BINARY = chibaclonkd
ETHERMINT_DIR = ethermint CHIBACLONK_DIR = chibaclonk
BUILDDIR ?= $(CURDIR)/build BUILDDIR ?= $(CURDIR)/build
SIMAPP = ./app SIMAPP = ./app
HTTPS_GIT := https://github.com/tharsis/ethermint.git HTTPS_GIT := https://github.com/vulcanize/chiba-clonk.git
DOCKER := $(shell which docker) DOCKER := $(shell which docker)
DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf
PROJECT_NAME = $(shell git remote get-url origin | xargs basename -s .git)
export GO111MODULE = on export GO111MODULE = on
@ -61,8 +62,8 @@ build_tags_comma_sep := $(subst $(whitespace),$(comma),$(build_tags))
# process linker flags # process linker flags
ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=ethermint \ ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=chibaclonk \
-X github.com/cosmos/cosmos-sdk/version.AppName=$(ETHERMINT_BINARY) \ -X github.com/cosmos/cosmos-sdk/version.AppName=$(CHIBACLONK_BINARY) \
-X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \ -X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \
-X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \ -X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \
-X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)" \ -X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)" \
@ -344,8 +345,8 @@ test-sim-nondeterminism:
test-sim-custom-genesis-fast: test-sim-custom-genesis-fast:
@echo "Running custom genesis simulation..." @echo "Running custom genesis simulation..."
@echo "By default, ${HOME}/.$(ETHERMINT_DIR)/config/genesis.json will be used." @echo "By default, ${HOME}/.$(CHIBACLONK_DIR)/config/genesis.json will be used."
@go test -mod=readonly $(SIMAPP) -run TestFullAppSimulation -Genesis=${HOME}/.$(ETHERMINT_DIR)/config/genesis.json \ @go test -mod=readonly $(SIMAPP) -run TestFullAppSimulation -Genesis=${HOME}/.$(CHIBACLONK_DIR)/config/genesis.json \
-Enabled=true -NumBlocks=100 -BlockSize=200 -Commit=true -Seed=99 -Period=5 -v -timeout 24h -Enabled=true -NumBlocks=100 -BlockSize=200 -Commit=true -Seed=99 -Period=5 -v -timeout 24h
test-sim-import-export: runsim test-sim-import-export: runsim
@ -358,8 +359,8 @@ test-sim-after-import: runsim
test-sim-custom-genesis-multi-seed: runsim test-sim-custom-genesis-multi-seed: runsim
@echo "Running multi-seed custom genesis simulation..." @echo "Running multi-seed custom genesis simulation..."
@echo "By default, ${HOME}/.$(ETHERMINT_DIR)/config/genesis.json will be used." @echo "By default, ${HOME}/.$(CHIBACLONK_DIR)/config/genesis.json will be used."
@$(BINDIR)/runsim -Genesis=${HOME}/.$(ETHERMINT_DIR)/config/genesis.json -SimAppPkg=$(SIMAPP) -ExitOnFail 400 5 TestFullAppSimulation @$(BINDIR)/runsim -Genesis=${HOME}/.$(CHIBACLONK_DIR)/config/genesis.json -SimAppPkg=$(SIMAPP) -ExitOnFail 400 5 TestFullAppSimulation
test-sim-multi-seed-long: runsim test-sim-multi-seed-long: runsim
@echo "Running long multi-seed application simulation. This may take awhile!" @echo "Running long multi-seed application simulation. This may take awhile!"
@ -414,9 +415,9 @@ format-fix:
containerProtoVer=v0.2 containerProtoVer=v0.2
containerProtoImage=tendermintdev/sdk-proto-gen:$(containerProtoVer) containerProtoImage=tendermintdev/sdk-proto-gen:$(containerProtoVer)
containerProtoGen=cosmos-sdk-proto-gen-$(containerProtoVer) containerProtoGen=$(PROJECT_NAME)-proto-gen-$(containerProtoVer)
containerProtoGenSwagger=cosmos-sdk-proto-gen-swagger-$(containerProtoVer) containerProtoGenSwagger=$(PROJECT_NAME)-proto-gen-swagger-$(containerProtoVer)
containerProtoFmt=cosmos-sdk-proto-fmt-$(containerProtoVer) containerProtoFmt=$(PROJECT_NAME)-proto-fmt-$(containerProtoVer)
proto-all: proto-format proto-lint proto-gen proto-all: proto-format proto-lint proto-gen
@ -494,19 +495,19 @@ ifeq ($(OS),Windows_NT)
mkdir localnet-setup & mkdir localnet-setup &
@$(MAKE) localnet-build @$(MAKE) localnet-build
IF not exist "build/node0/$(ETHERMINT_BINARY)/config/genesis.json" docker run --rm -v $(CURDIR)/build\ethermint\Z ethermintd/node "./ethermintd testnet --v 4 -o /ethermint --keyring-backend=test --ip-addresses ethermintdnode0,ethermintdnode1,ethermintdnode2,ethermintdnode3" IF not exist "build/node0/$(CHIBACLONK_BINARY)/config/genesis.json" docker run --rm -v $(CURDIR)/build\ethermint\Z chibaclonkd/node sh -c "chibaclonkd testnet init-files --v 4 --keyring-backend=test"
docker-compose up -d docker-compose up -d
else else
mkdir -p localnet-setup mkdir -p localnet-setup
@$(MAKE) localnet-build @$(MAKE) localnet-build
if ! [ -f localnet-setup/node0/$(ETHERMINT_BINARY)/config/genesis.json ]; then docker run --rm -v $(CURDIR)/localnet-setup:/ethermint:Z ethermintd/node "./ethermintd testnet --v 4 -o /ethermint --keyring-backend=test --ip-addresses ethermintdnode0,ethermintdnode1,ethermintdnode2,ethermintdnode3"; fi if ! [ -f localnet-setup/node0/$(CHIBACLONK_BINARY)/config/genesis.json ]; then docker run --rm -v $(CURDIR)/localnet-setup:/localnet-setup:Z chibaclonkd/node sh -c "chibaclonkd testnet init-files --v 4 --keyring-backend=test"; fi
docker-compose up -d docker-compose up -d
endif endif
# Stop testnet # Stop testnet
localnet-stop: localnet-stop:
docker-compose down docker-compose down -v
# Clean testnet # Clean testnet
localnet-clean: localnet-clean:
@ -517,15 +518,15 @@ localnet-clean:
localnet-unsafe-reset: localnet-unsafe-reset:
docker-compose down docker-compose down
ifeq ($(OS),Windows_NT) ifeq ($(OS),Windows_NT)
@docker run --rm -v $(CURDIR)\localnet-setup\node0\ethermitd:ethermint\Z ethermintd/node "./ethermintd unsafe-reset-all --home=/ethermint" @docker run --rm -v $(CURDIR)\localnet-setup\node0\chibaclonkd:chibaclonk\Z chibaclonkd/node "chibaclonkd unsafe-reset-all --home=/chibaclonk"
@docker run --rm -v $(CURDIR)\localnet-setup\node1\ethermitd:ethermint\Z ethermintd/node "./ethermintd unsafe-reset-all --home=/ethermint" @docker run --rm -v $(CURDIR)\localnet-setup\node1\chibaclonkd:chibaclonk\Z chibaclonkd/node "chibaclonkd unsafe-reset-all --home=/chibaclonk"
@docker run --rm -v $(CURDIR)\localnet-setup\node2\ethermitd:ethermint\Z ethermintd/node "./ethermintd unsafe-reset-all --home=/ethermint" @docker run --rm -v $(CURDIR)\localnet-setup\node2\chibaclonkd:chibaclonk\Z chibaclonkd/node "chibaclonkd unsafe-reset-all --home=/chibaclonk"
@docker run --rm -v $(CURDIR)\localnet-setup\node3\ethermitd:ethermint\Z ethermintd/node "./ethermintd unsafe-reset-all --home=/ethermint" @docker run --rm -v $(CURDIR)\localnet-setup\node3\chibaclonkd:chibaclonk\Z chibaclonkd/node "chibaclonkd unsafe-reset-all --home=/chibaclonk"
else else
@docker run --rm -v $(CURDIR)/localnet-setup/node0/ethermitd:/ethermint:Z ethermintd/node "./ethermintd unsafe-reset-all --home=/ethermint" @docker run --rm -v $(CURDIR)/localnet-setup/node0/chibaclonkd:/chibaclonk:Z chibaclonkd/node "chibaclonkd unsafe-reset-all --home=/chibaclonk"
@docker run --rm -v $(CURDIR)/localnet-setup/node1/ethermitd:/ethermint:Z ethermintd/node "./ethermintd unsafe-reset-all --home=/ethermint" @docker run --rm -v $(CURDIR)/localnet-setup/node1/chibaclonkd:/chibaclonk:Z chibaclonkd/node "chibaclonkd unsafe-reset-all --home=/chibaclonk"
@docker run --rm -v $(CURDIR)/localnet-setup/node2/ethermitd:/ethermint:Z ethermintd/node "./ethermintd unsafe-reset-all --home=/ethermint" @docker run --rm -v $(CURDIR)/localnet-setup/node2/chibaclonkd:/chibaclonk:Z chibaclonkd/node "chibaclonkd unsafe-reset-all --home=/chibaclonk"
@docker run --rm -v $(CURDIR)/localnet-setup/node3/ethermitd:/ethermint:Z ethermintd/node "./ethermintd unsafe-reset-all --home=/ethermint" @docker run --rm -v $(CURDIR)/localnet-setup/node3/chibaclonkd:/chibaclonk:Z chibaclonkd/node "chibaclonkd unsafe-reset-all --home=/chibaclonk"
endif endif
# Clean testnet # Clean testnet

View File

@ -128,10 +128,10 @@ func init() {
panic(err) panic(err)
} }
DefaultNodeHome = filepath.Join(userHomeDir, ".ethermintd") DefaultNodeHome = filepath.Join(userHomeDir, ".chibaclonkd")
} }
const appName = "ethermintd" const appName = "chibaclonkd"
var ( var (
// DefaultNodeHome default home directories for the application daemon // DefaultNodeHome default home directories for the application daemon

View File

@ -86,7 +86,7 @@ type startArgs struct {
func addTestnetFlagsToCmd(cmd *cobra.Command) { func addTestnetFlagsToCmd(cmd *cobra.Command) {
cmd.Flags().Int(flagNumValidators, 4, "Number of validators to initialize the testnet with") cmd.Flags().Int(flagNumValidators, 4, "Number of validators to initialize the testnet with")
cmd.Flags().StringP(flagOutputDir, "o", "./.testnets", "Directory to store initialization data for the testnet") cmd.Flags().StringP(flagOutputDir, "o", "./localnet-setup", "Directory to store initialization data for the testnet")
cmd.Flags().String(flags.FlagChainID, "", "genesis file chain-id, if left blank will be randomly created") cmd.Flags().String(flags.FlagChainID, "", "genesis file chain-id, if left blank will be randomly created")
cmd.Flags().String(sdkserver.FlagMinGasPrices, fmt.Sprintf("0.000006%s", ethermint.AttoPhoton), "Minimum gas prices to accept for transactions; All fees in a tx must meet this minimum (e.g. 0.01photino,0.001stake)") cmd.Flags().String(sdkserver.FlagMinGasPrices, fmt.Sprintf("0.000006%s", ethermint.AttoPhoton), "Minimum gas prices to accept for transactions; All fees in a tx must meet this minimum (e.g. 0.01photino,0.001stake)")
cmd.Flags().String(flags.FlagKeyAlgorithm, string(hd.EthSecp256k1Type), "Key signing algorithm to generate keys for") cmd.Flags().String(flags.FlagKeyAlgorithm, string(hd.EthSecp256k1Type), "Key signing algorithm to generate keys for")
@ -123,7 +123,7 @@ or a similar setup where each node has a manually configurable IP address.
Note, strict routability for addresses is turned off in the config file. Note, strict routability for addresses is turned off in the config file.
Example: Example:
evmosd testnet init-files --v 4 --output-dir ./.testnets --starting-ip-address 192.168.10.2 chibaclonkd testnet init-files --v 4 --output-dir ./.testnets --starting-ip-address 192.168.10.2
`, `,
RunE: func(cmd *cobra.Command, _ []string) error { RunE: func(cmd *cobra.Command, _ []string) error {
clientCtx, err := client.GetClientQueryContext(cmd) clientCtx, err := client.GetClientQueryContext(cmd)
@ -150,8 +150,8 @@ Example:
addTestnetFlagsToCmd(cmd) addTestnetFlagsToCmd(cmd)
cmd.Flags().String(flagNodeDirPrefix, "node", "Prefix the directory name for each node with (node results in node0, node1, ...)") cmd.Flags().String(flagNodeDirPrefix, "node", "Prefix the directory name for each node with (node results in node0, node1, ...)")
cmd.Flags().String(flagNodeDaemonHome, "evmosd", "Home directory of the node's daemon configuration") cmd.Flags().String(flagNodeDaemonHome, "chibaclonkd", "Home directory of the node's daemon configuration")
cmd.Flags().String(flagStartingIPAddress, "192.168.0.1", "Starting IP address (192.168.0.1 results in persistent peers list ID0@192.168.0.1:46656, ID1@192.168.0.2:46656, ...)") cmd.Flags().String(flagStartingIPAddress, "192.168.10.1", "Starting IP address (192.168.10.1 results in persistent peers list ID0@192.168.10.1:46656, ID1@192.168.10.2:46656, ...)")
cmd.Flags().String(flags.FlagKeyringBackend, flags.DefaultKeyringBackend, "Select keyring's backend (os|file|test)") cmd.Flags().String(flags.FlagKeyringBackend, flags.DefaultKeyringBackend, "Select keyring's backend (os|file|test)")
return cmd return cmd
@ -167,7 +167,7 @@ and generate "v" directories, populated with necessary validator configuration f
(private validator, genesis, config, etc.). (private validator, genesis, config, etc.).
Example: Example:
evmosd testnet --v 4 --output-dir ./.testnets chibaclonkd testnet --v 4 --output-dir ./.testnets
`, `,
RunE: func(cmd *cobra.Command, _ []string) error { RunE: func(cmd *cobra.Command, _ []string) error {
args := startArgs{} args := startArgs{}

View File

@ -11,11 +11,11 @@ import (
"github.com/cosmos/cosmos-sdk/x/genutil/client/cli" "github.com/cosmos/cosmos-sdk/x/genutil/client/cli"
"github.com/tharsis/ethermint/app" "github.com/tharsis/ethermint/app"
ethermintd "github.com/tharsis/ethermint/cmd/ethermintd" chibaclonkd "github.com/tharsis/ethermint/cmd/chibaclonkd"
) )
func TestInitCmd(t *testing.T) { func TestInitCmd(t *testing.T) {
rootCmd, _ := ethermintd.NewRootCmd() rootCmd, _ := chibaclonkd.NewRootCmd()
rootCmd.SetArgs([]string{ rootCmd.SetArgs([]string{
"init", // Test the init cmd "init", // Test the init cmd
"etherminttest", // Moniker "etherminttest", // Moniker

View File

@ -41,7 +41,7 @@ import (
ethermint "github.com/tharsis/ethermint/types" ethermint "github.com/tharsis/ethermint/types"
) )
const EnvPrefix = "ETHERMINT" const EnvPrefix = "CHIBACLONK"
// NewRootCmd creates a new root command for simd. It is called once in the // NewRootCmd creates a new root command for simd. It is called once in the
// main function. // main function.
@ -60,8 +60,8 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) {
WithViper(EnvPrefix) WithViper(EnvPrefix)
rootCmd := &cobra.Command{ rootCmd := &cobra.Command{
Use: "ethermintd", Use: "chibaclonkd",
Short: "Ethermint Daemon", Short: "Chiba-Clonk Daemon",
PersistentPreRunE: func(cmd *cobra.Command, _ []string) error { PersistentPreRunE: func(cmd *cobra.Command, _ []string) error {
// set the default command outputs // set the default command outputs
cmd.SetOut(cmd.OutOrStdout()) cmd.SetOut(cmd.OutOrStdout())

View File

@ -1,73 +1,87 @@
version: "3" version: "3"
services: services:
ethermintdnode0: chibaclonkdnode0:
container_name: ethermintdnode0 container_name: chibaclonkdnode0
image: "ethermintd/node" image: "chibaclonkd/node"
ports: ports:
- "26657:26657" - "26656-26657:26656-26657"
- "1317:1317"
- "9090:9090"
- "8545:8545" - "8545:8545"
- "8546:8546" - "8546:8546"
- "8125:8125" - "8125:8125"
environment: environment:
- ID=0 - ID=0
- LOG=${LOG:-ethermintd.log} - LOG=${LOG:-chibaclonkd.log}
volumes: volumes:
- ./localnet-setup/node0/ethermintd:/ethermint:Z - ./localnet-setup/node0/chibaclonkd:/chibaclonk:Z
networks: networks:
- localnet localnet:
entrypoint: "bash start-docker.sh" ipv4_address: 192.168.10.1
ethermintdnode1: chibaclonkdnode1:
container_name: ethermintdnode1 container_name: chibaclonkdnode1
image: "ethermintd/node" image: "chibaclonkd/node"
ports: ports:
- "26658:26657" - "26666-26667:26656-26657"
- "1318:1317"
- "9091:9090"
- "8555:8545" - "8555:8545"
- "8556:8546" - "8556:8546"
- "8126:8125" - "8126:8125"
environment: environment:
- ID=1 - ID=1
- LOG=${LOG:-ethermintd.log} - LOG=${LOG:-chibaclonkd.log}
volumes: volumes:
- ./localnet-setup/node1/ethermintd:/ethermint:Z - ./localnet-setup/node1/chibaclonkd:/chibaclonk:Z
networks: networks:
- localnet localnet:
entrypoint: "bash start-docker.sh" ipv4_address: 192.168.10.2
ethermintdnode2: chibaclonkdnode2:
container_name: ethermintdnode2 container_name: chibaclonkdnode2
image: "ethermintd/node" image: "chibaclonkd/node"
environment: environment:
- ID=2 - ID=2
- LOG=${LOG:-ethermintd.log} - LOG=${LOG:-chibaclonkd.log}
ports: ports:
- "26659:26657" - "26676-26677:26656-26657"
- "1319:1317"
- "9092:9090"
- "8565:8545" - "8565:8545"
- "8566:8546" - "8566:8546"
- "8127:8125" - "8127:8125"
volumes: volumes:
- ./localnet-setup/node2/ethermintd:/ethermint:Z - ./localnet-setup/node2/chibaclonkd:/chibaclonk:Z
networks: networks:
- localnet localnet:
entrypoint: "bash start-docker.sh" ipv4_address: 192.168.10.3
ethermintdnode3: chibaclonkdnode3:
container_name: ethermintdnode3 container_name: chibaclonkdnode3
image: "ethermintd/node" image: "chibaclonkd/node"
environment: environment:
- ID=3 - ID=3
- LOG=${LOG:-ethermintd.log} - LOG=${LOG:-chibaclonkd.log}
ports: ports:
- "26660:26657" - "26686-26687:26656-26657"
- "1320:1317"
- "9093:9090"
- "8575:8545" - "8575:8545"
- "8576:8546" - "8576:8546"
- "8128:8125" - "8128:8125"
volumes: volumes:
- ./localnet-setup/node3/ethermintd:/ethermint:Z - ./localnet-setup/node3/chibaclonkd:/chibaclonk:Z
networks: networks:
- localnet localnet:
entrypoint: "bash start-docker.sh" ipv4_address: 192.168.10.4
# entrypoint: "sh scripts/start-docker.sh"
networks: networks:
localnet: localnet:
driver: bridge
ipam:
driver: default
config:
- subnet: 192.168.10.0/16

View File

@ -5,7 +5,7 @@
## Start server ## Start server
```shell ```shell
./build/ethermintd start --gql-playground --gql-server ./build/chibaclonkd start --gql-playground --gql-server
``` ```
Basic node status: Basic node status:

View File

@ -1,5 +1,5 @@
rem ethermint compile on windows rem chibaclonk compile on windows
rem install golang , gcc, sed for windows rem install golang , gcc, sed for windows
rem 1. install msys2 : https://www.msys2.org/ rem 1. install msys2 : https://www.msys2.org/
rem 2. pacman -S mingw-w64-x86_64-toolchain rem 2. pacman -S mingw-w64-x86_64-toolchain
@ -9,7 +9,7 @@ rem 3. add path C:\msys64\mingw64\bin
rem C:\msys64\usr\bin rem C:\msys64\usr\bin
set KEY="mykey" set KEY="mykey"
set CHAINID="ethermint_9000-1" set CHAINID="chibaclonk_9000-1"
set MONIKER="localtestnet" set MONIKER="localtestnet"
set KEYRING="test" set KEYRING="test"
set KEYALGO="eth_secp256k1" set KEYALGO="eth_secp256k1"
@ -17,26 +17,26 @@ set LOGLEVEL="info"
rem to trace evm rem to trace evm
rem TRACE="--trace" rem TRACE="--trace"
set TRACE="" set TRACE=""
set HOME=%USERPROFILE%\.ethermintd set HOME=%USERPROFILE%\.chibaclonkd
echo %HOME% echo %HOME%
set ETHCONFIG=%HOME%\config\config.toml set ETHCONFIG=%HOME%\config\config.toml
set GENESIS=%HOME%\config\genesis.json set GENESIS=%HOME%\config\genesis.json
set TMPGENESIS=%HOME%\config\tmp_genesis.json set TMPGENESIS=%HOME%\config\tmp_genesis.json
@echo build binary @echo build binary
go build .\cmd\ethermintd go build .\cmd\chibaclonkd
@echo clear home folder @echo clear home folder
del /s /q %HOME% del /s /q %HOME%
ethermintd config keyring-backend %KEYRING% chibaclonkd config keyring-backend %KEYRING%
ethermintd config chain-id %CHAINID% chibaclonkd config chain-id %CHAINID%
ethermintd keys add %KEY% --keyring-backend %KEYRING% --algo %KEYALGO% chibaclonkd keys add %KEY% --keyring-backend %KEYRING% --algo %KEYALGO%
rem Set moniker and chain-id for Ethermint (Moniker can be anything, chain-id must be an integer) rem Set moniker and chain-id for chibaclonk (Moniker can be anything, chain-id must be an integer)
ethermintd init %MONIKER% --chain-id %CHAINID% chibaclonkd init %MONIKER% --chain-id %CHAINID%
rem Change parameter token denominations to aphoton rem Change parameter token denominations to aphoton
cat %GENESIS% | jq ".app_state[\"staking\"][\"params\"][\"bond_denom\"]=\"aphoton\"" > %TMPGENESIS% && move %TMPGENESIS% %GENESIS% cat %GENESIS% | jq ".app_state[\"staking\"][\"params\"][\"bond_denom\"]=\"aphoton\"" > %TMPGENESIS% && move %TMPGENESIS% %GENESIS%
@ -54,18 +54,18 @@ rem setup
sed -i "s/create_empty_blocks = true/create_empty_blocks = false/g" %ETHCONFIG% sed -i "s/create_empty_blocks = true/create_empty_blocks = false/g" %ETHCONFIG%
rem Allocate genesis accounts (cosmos formatted addresses) rem Allocate genesis accounts (cosmos formatted addresses)
ethermintd add-genesis-account %KEY% 100000000000000000000000000aphoton --keyring-backend %KEYRING% chibaclonkd add-genesis-account %KEY% 100000000000000000000000000aphoton --keyring-backend %KEYRING%
rem Sign genesis transaction rem Sign genesis transaction
ethermintd gentx %KEY% 1000000000000000000000aphoton --keyring-backend %KEYRING% --chain-id %CHAINID% chibaclonkd gentx %KEY% 1000000000000000000000aphoton --keyring-backend %KEYRING% --chain-id %CHAINID%
rem Collect genesis tx rem Collect genesis tx
ethermintd collect-gentxs chibaclonkd collect-gentxs
rem Run this to ensure everything worked and that the genesis file is setup correctly rem Run this to ensure everything worked and that the genesis file is setup correctly
ethermintd validate-genesis chibaclonkd validate-genesis
rem Start the node (remove the --pruning=nothing flag if historical queries are not needed) rem Start the node (remove the --pruning=nothing flag if historical queries are not needed)
ethermintd start --pruning=nothing %TRACE% --log_level %LOGLEVEL% --minimum-gas-prices=0.0001aphoton chibaclonkd start --pruning=nothing %TRACE% --log_level %LOGLEVEL% --minimum-gas-prices=0.0001aphoton

76
init.sh
View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
KEY="mykey" KEY="mykey"
CHAINID="ethermint_9000-1" CHAINID="chibaclonk_9000-1"
MONIKER="localtestnet" MONIKER="localtestnet"
KEYRING="test" KEYRING="test"
KEYALGO="eth_secp256k1" KEYALGO="eth_secp256k1"
@ -14,77 +14,77 @@ TRACE="--trace"
command -v jq > /dev/null 2>&1 || { echo >&2 "jq not installed. More info: https://stedolan.github.io/jq/download/"; exit 1; } command -v jq > /dev/null 2>&1 || { echo >&2 "jq not installed. More info: https://stedolan.github.io/jq/download/"; exit 1; }
# remove existing daemon and client # remove existing daemon and client
rm -rf ~/.ethermintd* rm -rf ~/.chibaclonk*
make install make install
ethermintd config keyring-backend $KEYRING chibaclonkd config keyring-backend $KEYRING
ethermintd config chain-id $CHAINID chibaclonkd config chain-id $CHAINID
# if $KEY exists it should be deleted # if $KEY exists it should be deleted
ethermintd keys add $KEY --keyring-backend $KEYRING --algo $KEYALGO chibaclonkd keys add $KEY --keyring-backend $KEYRING --algo $KEYALGO
# Set moniker and chain-id for Ethermint (Moniker can be anything, chain-id must be an integer) # Set moniker and chain-id for chibaclonk (Moniker can be anything, chain-id must be an integer)
ethermintd init $MONIKER --chain-id $CHAINID chibaclonkd init $MONIKER --chain-id $CHAINID
# Change parameter token denominations to aphoton # Change parameter token denominations to aphoton
cat $HOME/.ethermintd/config/genesis.json | jq '.app_state["staking"]["params"]["bond_denom"]="aphoton"' > $HOME/.ethermintd/config/tmp_genesis.json && mv $HOME/.ethermintd/config/tmp_genesis.json $HOME/.ethermintd/config/genesis.json cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["staking"]["params"]["bond_denom"]="aphoton"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json
cat $HOME/.ethermintd/config/genesis.json | jq '.app_state["crisis"]["constant_fee"]["denom"]="aphoton"' > $HOME/.ethermintd/config/tmp_genesis.json && mv $HOME/.ethermintd/config/tmp_genesis.json $HOME/.ethermintd/config/genesis.json cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["crisis"]["constant_fee"]["denom"]="aphoton"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json
cat $HOME/.ethermintd/config/genesis.json | jq '.app_state["gov"]["deposit_params"]["min_deposit"][0]["denom"]="aphoton"' > $HOME/.ethermintd/config/tmp_genesis.json && mv $HOME/.ethermintd/config/tmp_genesis.json $HOME/.ethermintd/config/genesis.json cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["gov"]["deposit_params"]["min_deposit"][0]["denom"]="aphoton"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json
cat $HOME/.ethermintd/config/genesis.json | jq '.app_state["mint"]["params"]["mint_denom"]="aphoton"' > $HOME/.ethermintd/config/tmp_genesis.json && mv $HOME/.ethermintd/config/tmp_genesis.json $HOME/.ethermintd/config/genesis.json cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["mint"]["params"]["mint_denom"]="aphoton"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json
# increase block time (?) # increase block time (?)
cat $HOME/.ethermintd/config/genesis.json | jq '.consensus_params["block"]["time_iota_ms"]="1000"' > $HOME/.ethermintd/config/tmp_genesis.json && mv $HOME/.ethermintd/config/tmp_genesis.json $HOME/.ethermintd/config/genesis.json cat $HOME/.chibaclonkd/config/genesis.json | jq '.consensus_params["block"]["time_iota_ms"]="1000"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json
# Set gas limit in genesis # Set gas limit in genesis
cat $HOME/.ethermintd/config/genesis.json | jq '.consensus_params["block"]["max_gas"]="10000000"' > $HOME/.ethermintd/config/tmp_genesis.json && mv $HOME/.ethermintd/config/tmp_genesis.json $HOME/.ethermintd/config/genesis.json cat $HOME/.chibaclonkd/config/genesis.json | jq '.consensus_params["block"]["max_gas"]="10000000"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json
# disable produce empty block # disable produce empty block
if [[ "$OSTYPE" == "darwin"* ]]; then if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i '' 's/create_empty_blocks = true/create_empty_blocks = false/g' $HOME/.ethermintd/config/config.toml sed -i '' 's/create_empty_blocks = true/create_empty_blocks = false/g' $HOME/.chibaclonkd/config/config.toml
else else
sed -i 's/create_empty_blocks = true/create_empty_blocks = false/g' $HOME/.ethermintd/config/config.toml sed -i 's/create_empty_blocks = true/create_empty_blocks = false/g' $HOME/.chibaclonkd/config/config.toml
fi fi
if [[ $1 == "pending" ]]; then if [[ $1 == "pending" ]]; then
if [[ "$OSTYPE" == "darwin"* ]]; then if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i '' 's/create_empty_blocks_interval = "0s"/create_empty_blocks_interval = "30s"/g' $HOME/.ethermintd/config/config.toml sed -i '' 's/create_empty_blocks_interval = "0s"/create_empty_blocks_interval = "30s"/g' $HOME/.chibaclonkd/config/config.toml
sed -i '' 's/timeout_propose = "3s"/timeout_propose = "30s"/g' $HOME/.ethermintd/config/config.toml sed -i '' 's/timeout_propose = "3s"/timeout_propose = "30s"/g' $HOME/.chibaclonkd/config/config.toml
sed -i '' 's/timeout_propose_delta = "500ms"/timeout_propose_delta = "5s"/g' $HOME/.ethermintd/config/config.toml sed -i '' 's/timeout_propose_delta = "500ms"/timeout_propose_delta = "5s"/g' $HOME/.chibaclonkd/config/config.toml
sed -i '' 's/timeout_prevote = "1s"/timeout_prevote = "10s"/g' $HOME/.ethermintd/config/config.toml sed -i '' 's/timeout_prevote = "1s"/timeout_prevote = "10s"/g' $HOME/.chibaclonkd/config/config.toml
sed -i '' 's/timeout_prevote_delta = "500ms"/timeout_prevote_delta = "5s"/g' $HOME/.ethermintd/config/config.toml sed -i '' 's/timeout_prevote_delta = "500ms"/timeout_prevote_delta = "5s"/g' $HOME/.chibaclonkd/config/config.toml
sed -i '' 's/timeout_precommit = "1s"/timeout_precommit = "10s"/g' $HOME/.ethermintd/config/config.toml sed -i '' 's/timeout_precommit = "1s"/timeout_precommit = "10s"/g' $HOME/.chibaclonkd/config/config.toml
sed -i '' 's/timeout_precommit_delta = "500ms"/timeout_precommit_delta = "5s"/g' $HOME/.ethermintd/config/config.toml sed -i '' 's/timeout_precommit_delta = "500ms"/timeout_precommit_delta = "5s"/g' $HOME/.chibaclonkd/config/config.toml
sed -i '' 's/timeout_commit = "5s"/timeout_commit = "150s"/g' $HOME/.ethermintd/config/config.toml sed -i '' 's/timeout_commit = "5s"/timeout_commit = "150s"/g' $HOME/.chibaclonkd/config/config.toml
sed -i '' 's/timeout_broadcast_tx_commit = "10s"/timeout_broadcast_tx_commit = "150s"/g' $HOME/.ethermintd/config/config.toml sed -i '' 's/timeout_broadcast_tx_commit = "10s"/timeout_broadcast_tx_commit = "150s"/g' $HOME/.chibaclonkd/config/config.toml
else else
sed -i 's/create_empty_blocks_interval = "0s"/create_empty_blocks_interval = "30s"/g' $HOME/.ethermintd/config/config.toml sed -i 's/create_empty_blocks_interval = "0s"/create_empty_blocks_interval = "30s"/g' $HOME/.chibaclonkd/config/config.toml
sed -i 's/timeout_propose = "3s"/timeout_propose = "30s"/g' $HOME/.ethermintd/config/config.toml sed -i 's/timeout_propose = "3s"/timeout_propose = "30s"/g' $HOME/.chibaclonkd/config/config.toml
sed -i 's/timeout_propose_delta = "500ms"/timeout_propose_delta = "5s"/g' $HOME/.ethermintd/config/config.toml sed -i 's/timeout_propose_delta = "500ms"/timeout_propose_delta = "5s"/g' $HOME/.chibaclonkd/config/config.toml
sed -i 's/timeout_prevote = "1s"/timeout_prevote = "10s"/g' $HOME/.ethermintd/config/config.toml sed -i 's/timeout_prevote = "1s"/timeout_prevote = "10s"/g' $HOME/.chibaclonkd/config/config.toml
sed -i 's/timeout_prevote_delta = "500ms"/timeout_prevote_delta = "5s"/g' $HOME/.ethermintd/config/config.toml sed -i 's/timeout_prevote_delta = "500ms"/timeout_prevote_delta = "5s"/g' $HOME/.chibaclonkd/config/config.toml
sed -i 's/timeout_precommit = "1s"/timeout_precommit = "10s"/g' $HOME/.ethermintd/config/config.toml sed -i 's/timeout_precommit = "1s"/timeout_precommit = "10s"/g' $HOME/.chibaclonkd/config/config.toml
sed -i 's/timeout_precommit_delta = "500ms"/timeout_precommit_delta = "5s"/g' $HOME/.ethermintd/config/config.toml sed -i 's/timeout_precommit_delta = "500ms"/timeout_precommit_delta = "5s"/g' $HOME/.chibaclonkd/config/config.toml
sed -i 's/timeout_commit = "5s"/timeout_commit = "150s"/g' $HOME/.ethermintd/config/config.toml sed -i 's/timeout_commit = "5s"/timeout_commit = "150s"/g' $HOME/.chibaclonkd/config/config.toml
sed -i 's/timeout_broadcast_tx_commit = "10s"/timeout_broadcast_tx_commit = "150s"/g' $HOME/.ethermintd/config/config.toml sed -i 's/timeout_broadcast_tx_commit = "10s"/timeout_broadcast_tx_commit = "150s"/g' $HOME/.chibaclonkd/config/config.toml
fi fi
fi fi
# Allocate genesis accounts (cosmos formatted addresses) # Allocate genesis accounts (cosmos formatted addresses)
ethermintd add-genesis-account $KEY 100000000000000000000000000aphoton --keyring-backend $KEYRING chibaclonkd add-genesis-account $KEY 100000000000000000000000000aphoton --keyring-backend $KEYRING
# Sign genesis transaction # Sign genesis transaction
ethermintd gentx $KEY 1000000000000000000000aphoton --keyring-backend $KEYRING --chain-id $CHAINID chibaclonkd gentx $KEY 1000000000000000000000aphoton --keyring-backend $KEYRING --chain-id $CHAINID
# Collect genesis tx # Collect genesis tx
ethermintd collect-gentxs chibaclonkd collect-gentxs
# Run this to ensure everything worked and that the genesis file is setup correctly # Run this to ensure everything worked and that the genesis file is setup correctly
ethermintd validate-genesis chibaclonkd validate-genesis
if [[ $1 == "pending" ]]; then if [[ $1 == "pending" ]]; then
echo "pending mode is on, please wait for the first block committed." echo "pending mode is on, please wait for the first block committed."
fi fi
# Start the node (remove the --pruning=nothing flag if historical queries are not needed) # Start the node (remove the --pruning=nothing flag if historical queries are not needed)
ethermintd start --pruning=nothing --evm.tracer=json $TRACE --log_level $LOGLEVEL --minimum-gas-prices=0.0001aphoton --json-rpc.api eth,txpool,personal,net,debug,web3,miner --api.enable chibaclonkd start --pruning=nothing --evm.tracer=json $TRACE --log_level $LOGLEVEL --minimum-gas-prices=0.0001aphoton --json-rpc.api eth,txpool,personal,net,debug,web3,miner --api.enable

View File

@ -1,4 +1,4 @@
all: all:
docker build --no-cache --tag ethermintd/node ../.. -f ethermintnode/Dockerfile docker build --no-cache --tag chibaclonkd/node ../.. -f chibaclonknode/Dockerfile
.PHONY: all .PHONY: all

View File

@ -0,0 +1,33 @@
FROM golang:alpine AS build-env
# Install minimum necessary dependencies,
ENV PACKAGES curl make git libc-dev bash gcc linux-headers eudev-dev python3
RUN apk add --no-cache $PACKAGES
# Set up dependencies
ENV PACKAGES git build-base
# Set working directory for the build
WORKDIR /go/src/github.com/vulcanize/chiba-clonk
# Add source files
COPY . .
# build binary
RUN make build-linux
# Final image
FROM alpine:edge
# Install ca-certificates
RUN apk add --update ca-certificates jq
WORKDIR /
# Copy over binaries from the build-env
COPY --from=build-env /go/src/github.com/vulcanize/chiba-clonk/build/chibaclonkd /usr/bin/chibaclonkd
EXPOSE 26656 26657 1317 9090 8545 8546
# Run ethermintd by default
CMD ["chibaclonkd","start","--gql-playground","--gql-server","--home","/chibaclonk"]

View File

@ -1,31 +0,0 @@
FROM golang:stretch as build-env
# Install minimum necessary dependencies
ENV PACKAGES curl make git libc-dev bash gcc
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y $PACKAGES
# Set working directory for the build
WORKDIR /go/src/github.com/tharsis/ethermint
# Add source files
COPY . .
# build Ethermint
RUN make build-linux
# Final image
FROM golang:1.17 as final
WORKDIR /
RUN apt-get update
# Copy over binaries from the build-env
COPY --from=build-env /go/src/github.com/tharsis/ethermint/build/ethermintd /
COPY --from=build-env /go/src/github.com/tharsis/ethermint/scripts/start-docker.sh /
EXPOSE 26656 26657 1317 8545 8546
# Run ethermintd by default, omit entrypoint to ease using container with ethermintd
ENTRYPOINT ["/bin/bash", "-c"]

View File

@ -1,41 +1,41 @@
#!/bin/bash #!/bin/bash
KEY="mykey" KEY="mykey"
CHAINID="ethermint_9000-1" CHAINID="chibaclonk_9000-1"
MONIKER="localtestnet" MONIKER="localtestnet"
# stop and remove existing daemon and client data and process(es) # stop and remove existing daemon and client data and process(es)
rm -rf ~/.ethermint* rm -rf ~/.chibaclonk*
pkill -f "ethermint*" pkill -f "chibaclonk*"
make build-ethermint make build
# if $KEY exists it should be override # if $KEY exists it should be override
"$PWD"/build/ethermintd keys add $KEY --keyring-backend test --algo "eth_secp256k1" "$PWD"/build/chibaclonkd keys add $KEY --keyring-backend test --algo "eth_secp256k1"
# Set moniker and chain-id for Ethermint (Moniker can be anything, chain-id must be an integer) # Set moniker and chain-id for Ethermint (Moniker can be anything, chain-id must be an integer)
"$PWD"/build/ethermintd init $MONIKER --chain-id $CHAINID "$PWD"/build/chibaclonkd init $MONIKER --chain-id $CHAINID
# Change parameter token denominations to aphoton # Change parameter token denominations to aphoton
cat $HOME/.ethermint/config/genesis.json | jq '.app_state["staking"]["params"]["bond_denom"]="stake"' > $HOME/.ethermint/config/tmp_genesis.json && mv $HOME/.ethermint/config/tmp_genesis.json $HOME/.ethermint/config/genesis.json cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["staking"]["params"]["bond_denom"]="stake"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json
cat $HOME/.ethermint/config/genesis.json | jq '.app_state["crisis"]["constant_fee"]["denom"]="aphoton"' > $HOME/.ethermint/config/tmp_genesis.json && mv $HOME/.ethermint/config/tmp_genesis.json $HOME/.ethermint/config/genesis.json cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["crisis"]["constant_fee"]["denom"]="aphoton"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json
cat $HOME/.ethermint/config/genesis.json | jq '.app_state["gov"]["deposit_params"]["min_deposit"][0]["denom"]="aphoton"' > $HOME/.ethermint/config/tmp_genesis.json && mv $HOME/.ethermint/config/tmp_genesis.json $HOME/.ethermint/config/genesis.json cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["gov"]["deposit_params"]["min_deposit"][0]["denom"]="aphoton"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json
cat $HOME/.ethermint/config/genesis.json | jq '.app_state["mint"]["params"]["mint_denom"]="aphoton"' > $HOME/.ethermint/config/tmp_genesis.json && mv $HOME/.ethermint/config/tmp_genesis.json $HOME/.ethermint/config/genesis.json cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["mint"]["params"]["mint_denom"]="aphoton"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json
# Allocate genesis accounts (cosmos formatted addresses) # Allocate genesis accounts (cosmos formatted addresses)
"$PWD"/build/ethermintd add-genesis-account "$("$PWD"/build/ethermintd keys show "$KEY" -a --keyring-backend test)" 100000000000000000000aphoton,10000000000000000000stake --keyring-backend test "$PWD"/build/chibaclonkd add-genesis-account "$("$PWD"/build/chibaclonkd keys show "$KEY" -a --keyring-backend test)" 100000000000000000000aphoton,10000000000000000000stake --keyring-backend test
# Sign genesis transaction # Sign genesis transaction
"$PWD"/build/ethermintd gentx $KEY 10000000000000000000stake --amount=100000000000000000000aphoton --keyring-backend test --chain-id $CHAINID "$PWD"/build/chibaclonkd gentx $KEY 10000000000000000000stake --amount=100000000000000000000aphoton --keyring-backend test --chain-id $CHAINID
# Collect genesis tx # Collect genesis tx
"$PWD"/build/ethermintd collect-gentxs "$PWD"/build/chibaclonkd collect-gentxs
# Run this to ensure everything worked and that the genesis file is setup correctly # Run this to ensure everything worked and that the genesis file is setup correctly
"$PWD"/build/ethermintd validate-genesis "$PWD"/build/chibaclonkd validate-genesis
# Start the node (remove the --pruning=nothing flag if historical queries are not needed) in background and log to file # Start the node (remove the --pruning=nothing flag if historical queries are not needed) in background and log to file
"$PWD"/build/ethermintd start --pruning=nothing --rpc.unsafe --json-rpc.address="0.0.0.0:8545" --keyring-backend test > ethermintd.log 2>&1 & "$PWD"/build/chibaclonkd start --pruning=nothing --rpc.unsafe --json-rpc.address="0.0.0.0:8545" --keyring-backend test > ethermintd.log 2>&1 &
# Give ethermintd node enough time to launch # Give ethermintd node enough time to launch
sleep 5 sleep 5
@ -51,7 +51,7 @@ echo "$ACCT"
# Start testcases (not supported) # Start testcases (not supported)
# curl -X POST --data '{"jsonrpc":"2.0","method":"personal_unlockAccount","params":["'$ACCT'", ""],"id":1}' -H "Content-Type: application/json" http://localhost:8545 # curl -X POST --data '{"jsonrpc":"2.0","method":"personal_unlockAccount","params":["'$ACCT'", ""],"id":1}' -H "Content-Type: application/json" http://localhost:8545
#PRIVKEY="$("$PWD"/build/ethermintd keys export $KEY)" #PRIVKEY="$("$PWD"/build/chibaclonkd keys export $KEY)"
## need to get the private key from the account in order to check this functionality. ## need to get the private key from the account in order to check this functionality.
cd tests/solidity/suites/basic/ && go get && go run main.go $ACCT cd tests/solidity/suites/basic/ && go get && go run main.go $ACCT

View File

@ -67,14 +67,14 @@ make build
arr=() arr=()
init_func() { init_func() {
"$PWD"/build/ethermintd keys add $KEY"$i" --keyring-backend test --home "$DATA_DIR$i" --no-backup --algo "eth_secp256k1" "$PWD"/build/chibaclonkd keys add $KEY"$i" --keyring-backend test --home "$DATA_DIR$i" --no-backup --algo "eth_secp256k1"
"$PWD"/build/ethermintd init $MONIKER --chain-id $CHAINID --home "$DATA_DIR$i" "$PWD"/build/chibaclonkd init $MONIKER --chain-id $CHAINID --home "$DATA_DIR$i"
"$PWD"/build/ethermintd add-genesis-account \ "$PWD"/build/chibaclonkd add-genesis-account \
"$("$PWD"/build/ethermintd keys show "$KEY$i" --keyring-backend test -a --home "$DATA_DIR$i")" 1000000000000000000aphoton,1000000000000000000stake \ "$("$PWD"/build/chibaclonkd keys show "$KEY$i" --keyring-backend test -a --home "$DATA_DIR$i")" 1000000000000000000aphoton,1000000000000000000stake \
--keyring-backend test --home "$DATA_DIR$i" --keyring-backend test --home "$DATA_DIR$i"
"$PWD"/build/ethermintd gentx "$KEY$i" 1000000000000000000stake --chain-id $CHAINID --keyring-backend test --home "$DATA_DIR$i" "$PWD"/build/chibaclonkd gentx "$KEY$i" 1000000000000000000stake --chain-id $CHAINID --keyring-backend test --home "$DATA_DIR$i"
"$PWD"/build/ethermintd collect-gentxs --home "$DATA_DIR$i" "$PWD"/build/chibaclonkd collect-gentxs --home "$DATA_DIR$i"
"$PWD"/build/ethermintd validate-genesis --home "$DATA_DIR$i" "$PWD"/build/chibaclonkd validate-genesis --home "$DATA_DIR$i"
if [[ $MODE == "pending" ]]; then if [[ $MODE == "pending" ]]; then
ls $DATA_DIR$i ls $DATA_DIR$i
@ -104,7 +104,7 @@ init_func() {
start_func() { start_func() {
echo "starting ethermint node $i in background ..." echo "starting ethermint node $i in background ..."
"$PWD"/build/ethermintd start --pruning=nothing --rpc.unsafe \ "$PWD"/build/chibaclonkd start --pruning=nothing --rpc.unsafe \
--p2p.laddr tcp://$IP_ADDR:$NODE_P2P_PORT"$i" --address tcp://$IP_ADDR:$NODE_PORT"$i" --rpc.laddr tcp://$IP_ADDR:$NODE_RPC_PORT"$i" \ --p2p.laddr tcp://$IP_ADDR:$NODE_P2P_PORT"$i" --address tcp://$IP_ADDR:$NODE_PORT"$i" --rpc.laddr tcp://$IP_ADDR:$NODE_RPC_PORT"$i" \
--json-rpc.address=$IP_ADDR:$RPC_PORT"$i" \ --json-rpc.address=$IP_ADDR:$RPC_PORT"$i" \
--json-rpc.api="eth,txpool,personal,net,debug,web3" \ --json-rpc.api="eth,txpool,personal,net,debug,web3" \

View File

@ -1,11 +1,11 @@
#!/bin/bash #!/bin/sh
echo "prepare genesis: Run validate-genesis to ensure everything worked and that the genesis file is setup correctly" echo "prepare genesis: Run validate-genesis to ensure everything worked and that the genesis file is setup correctly"
./ethermintd validate-genesis --home /ethermint chibaclonkd validate-genesis --home /chibaclonk
echo "starting ethermint node $ID in background ..." echo "starting chibaclonk node $ID in background ..."
./ethermintd start \ chibaclonkd start \
--home /ethermint \ --home /chibaclonk \
--keyring-backend test --keyring-backend test
echo "started ethermint node" echo "started ethermint node"

View File

@ -63,7 +63,7 @@ fi
# Compile ethermint # Compile ethermint
echo "compiling ethermint" echo "compiling ethermint"
make build-ethermint make build
# PID array declaration # PID array declaration
arr=() arr=()
@ -73,24 +73,24 @@ arrcli=()
init_func() { init_func() {
echo "create and add new keys" echo "create and add new keys"
"$PWD"/build/ethermintd keys add $KEY"$i" --home "$DATA_DIR$i" --no-backup --chain-id $CHAINID --algo "eth_secp256k1" --keyring-backend test "$PWD"/build/chibaclonkd keys add $KEY"$i" --home "$DATA_DIR$i" --no-backup --chain-id $CHAINID --algo "eth_secp256k1" --keyring-backend test
echo "init Ethermint with moniker=$MONIKER and chain-id=$CHAINID" echo "init Ethermint with moniker=$MONIKER and chain-id=$CHAINID"
"$PWD"/build/ethermintd init $MONIKER --chain-id $CHAINID --home "$DATA_DIR$i" "$PWD"/build/chibaclonkd init $MONIKER --chain-id $CHAINID --home "$DATA_DIR$i"
echo "prepare genesis: Allocate genesis accounts" echo "prepare genesis: Allocate genesis accounts"
"$PWD"/build/ethermintd add-genesis-account \ "$PWD"/build/chibaclonkd add-genesis-account \
"$("$PWD"/build/ethermintd keys show "$KEY$i" -a --home "$DATA_DIR$i" --keyring-backend test)" 1000000000000000000aphoton,1000000000000000000stake \ "$("$PWD"/build/chibaclonkd keys show "$KEY$i" -a --home "$DATA_DIR$i" --keyring-backend test)" 1000000000000000000aphoton,1000000000000000000stake \
--home "$DATA_DIR$i" --keyring-backend test --home "$DATA_DIR$i" --keyring-backend test
echo "prepare genesis: Sign genesis transaction" echo "prepare genesis: Sign genesis transaction"
"$PWD"/build/ethermintd gentx $KEY"$i" 1000000000000000000stake --keyring-backend test --home "$DATA_DIR$i" --keyring-backend test --chain-id $CHAINID "$PWD"/build/chibaclonkd gentx $KEY"$i" 1000000000000000000stake --keyring-backend test --home "$DATA_DIR$i" --keyring-backend test --chain-id $CHAINID
echo "prepare genesis: Collect genesis tx" echo "prepare genesis: Collect genesis tx"
"$PWD"/build/ethermintd collect-gentxs --home "$DATA_DIR$i" "$PWD"/build/chibaclonkd collect-gentxs --home "$DATA_DIR$i"
echo "prepare genesis: Run validate-genesis to ensure everything worked and that the genesis file is setup correctly" echo "prepare genesis: Run validate-genesis to ensure everything worked and that the genesis file is setup correctly"
"$PWD"/build/ethermintd validate-genesis --home "$DATA_DIR$i" "$PWD"/build/chibaclonkd validate-genesis --home "$DATA_DIR$i"
} }
start_func() { start_func() {
echo "starting ethermint node $i in background ..." echo "starting ethermint node $i in background ..."
"$PWD"/build/ethermintd start --pruning=nothing --rpc.unsafe \ "$PWD"/build/chibaclonkd start --pruning=nothing --rpc.unsafe \
--p2p.laddr tcp://$IP_ADDR:$NODE_P2P_PORT"$i" --address tcp://$IP_ADDR:$NODE_PORT"$i" --rpc.laddr tcp://$IP_ADDR:$NODE_RPC_PORT"$i" \ --p2p.laddr tcp://$IP_ADDR:$NODE_P2P_PORT"$i" --address tcp://$IP_ADDR:$NODE_PORT"$i" --rpc.laddr tcp://$IP_ADDR:$NODE_RPC_PORT"$i" \
--json-rpc.address=$IP_ADDR:$RPC_PORT"$i" \ --json-rpc.address=$IP_ADDR:$RPC_PORT"$i" \
--keyring-backend test --home "$DATA_DIR$i" \ --keyring-backend test --home "$DATA_DIR$i" \

View File

@ -15,30 +15,30 @@ The following steps need to be followed only before running the chain for the fi
1. Add the root key: 1. Add the root key:
``` ```
./build/ethermintd keys add root ./build/chibaclonkd keys add root
``` ```
Keep a note of the keyring passphrase if you set it. Keep a note of the keyring passphrase if you set it.
2. Init the chain: 2. Init the chain:
``` ```
./build/ethermintd init test-moniker --chain-id ethermint_9000-1 ./build/chibaclonkd init test-moniker --chain-id ethermint_9000-1
``` ```
3. Add genesis account: 3. Add genesis account:
``` ```
./build/ethermintd add-genesis-account $(./build/ethermintd keys show root -a) 1000000000000000000aphoton,1000000000000000000stake ./build/chibaclonkd add-genesis-account $(./build/chibaclonkd keys show root -a) 1000000000000000000aphoton,1000000000000000000stake
``` ```
4. Make a genesis tx: 4. Make a genesis tx:
``` ```
./build/ethermintd gentx root 1000000000000000000stake --chain-id ethermint_9000-1 ./build/chibaclonkd gentx root 1000000000000000000stake --chain-id ethermint_9000-1
``` ```
5. Collect gentxs: 5. Collect gentxs:
``` ```
./build/ethermintd collect-gentxs ./build/chibaclonkd collect-gentxs
``` ```
The chain can now be started using: The chain can now be started using:
``` ```
./build/ethermintd start ./build/chibaclonkd start
``` ```
## Querying the Params ## Querying the Params
@ -46,7 +46,7 @@ The chain can now be started using:
The following command will dislay the default params for the `auction` module: The following command will dislay the default params for the `auction` module:
``` ```
# ./build/ethermintd q auction params -o json | jq # ./build/chibaclonkd q auction params -o json | jq
{ {
"params": { "params": {
@ -73,7 +73,7 @@ The following command will dislay the default params for the `auction` module:
### Create Auction ### Create Auction
``` ```
# ./build/ethermintd tx auction create 100s 100s 10aphoton 10aphoton 1000aphoton --from root --chain-id $(./build/ethermintd status | jq .NodeInfo.network -r) # ./build/chibaclonkd tx auction create 100s 100s 10aphoton 10aphoton 1000aphoton --from root --chain-id $(./build/chibaclonkd status | jq .NodeInfo.network -r)
Enter keyring passphrase: Enter keyring passphrase:
@ -98,7 +98,7 @@ txhash: ECAD6DF1ECA763FBD26EB7C2C0B77425FFE2FBEA2BEC57CE0FBC173AE0F45298
### Commit Bid ### Commit Bid
``` ```
# ./build/ethermintd tx auction commit-bid e7d14c7e7a6d7537cbdb8fbe62f22b1553c2ef4ce3705ada7c28f80faf2fbe0d 2000aphoton --from root --chain-id $(./build/ethermintd status | jq .NodeInfo.network -r) # ./build/chibaclonkd tx auction commit-bid e7d14c7e7a6d7537cbdb8fbe62f22b1553c2ef4ce3705ada7c28f80faf2fbe0d 2000aphoton --from root --chain-id $(./build/chibaclonkd status | jq .NodeInfo.network -r)
Enter keyring passphrase: Enter keyring passphrase:
@ -123,7 +123,7 @@ txhash: 71D8CF34026E32A3A34C2C2D4ADF25ABC8D7943A4619761BE27F196603D91B9D
### Reveal Bid ### Reveal Bid
``` ```
# ./build/ethermintd tx auction reveal-bid e7d14c7e7a6d7537cbdb8fbe62f22b1553c2ef4ce3705ada7c28f80faf2fbe0d root-bafyreibt4twofrc3xi2es27cfrroy346iy6lr3gkw33i5dltkqqarlyltm.json --from root --chain-id $(./build/ethermintd status | jq .NodeInfo.network -r) # ./build/chibaclonkd tx auction reveal-bid e7d14c7e7a6d7537cbdb8fbe62f22b1553c2ef4ce3705ada7c28f80faf2fbe0d root-bafyreibt4twofrc3xi2es27cfrroy346iy6lr3gkw33i5dltkqqarlyltm.json --from root --chain-id $(./build/chibaclonkd status | jq .NodeInfo.network -r)
Enter keyring passphrase: Enter keyring passphrase:
@ -150,7 +150,7 @@ txhash: 4D1C0B3DDA4050F9BB32240FBD5234229E5C32543C1A0A78033B9531EB0CF8BA
### List Auctions ### List Auctions
``` ```
# ./build/ethermintd q auction list # ./build/chibaclonkd q auction list
auctions: auctions:
auctions: auctions:
@ -182,7 +182,7 @@ pagination: null
### Get Bid ### Get Bid
``` ```
# ./build/ethermintd q auction get-bid e7d14c7e7a6d7537cbdb8fbe62f22b1553c2ef4ce3705ada7c28f80faf2fbe0e ethm1l7cstwtf2lvev27ka67c23yk7mmj8ad7tetpqc # ./build/chibaclonkd q auction get-bid e7d14c7e7a6d7537cbdb8fbe62f22b1553c2ef4ce3705ada7c28f80faf2fbe0e ethm1l7cstwtf2lvev27ka67c23yk7mmj8ad7tetpqc
bid: bid:
auction_id: e7d14c7e7a6d7537cbdb8fbe62f22b1553c2ef4ce3705ada7c28f80faf2fbe0d auction_id: e7d14c7e7a6d7537cbdb8fbe62f22b1553c2ef4ce3705ada7c28f80faf2fbe0d
@ -205,7 +205,7 @@ bid:
### Get All Bids for an Auction ### Get All Bids for an Auction
``` ```
./build/ethermintd q auction get-bids e7d14c7e7a6d7537cbdb8fbe62f22b1553c2ef4ce3705ada7c28f80faf2fbe0d ./build/chibaclonkd q auction get-bids e7d14c7e7a6d7537cbdb8fbe62f22b1553c2ef4ce3705ada7c28f80faf2fbe0d
bids: bids:
- auction_id: e7d14c7e7a6d7537cbdb8fbe62f22b1553c2ef4ce3705ada7c28f80faf2fbe0d - auction_id: e7d14c7e7a6d7537cbdb8fbe62f22b1553c2ef4ce3705ada7c28f80faf2fbe0d
@ -228,7 +228,7 @@ bids:
### Get Auction by AuctionID ### Get Auction by AuctionID
``` ```
# ./build/ethermintd q auction get e7d14c7e7a6d7537cbdb8fbe62f22b1553c2ef4ce3705ada7c28f80faf2fbe0d # ./build/chibaclonkd q auction get e7d14c7e7a6d7537cbdb8fbe62f22b1553c2ef4ce3705ada7c28f80faf2fbe0d
auction: auction:
commit_fee: commit_fee:
@ -259,7 +259,7 @@ auction:
### Get Auction by Bidder ### Get Auction by Bidder
``` ```
# ./build/ethermintd q auction query-by-owner ethm1l7cstwtf2lvev27ka67c23yk7mmj8ad7tetpqc # ./build/chibaclonkd q auction query-by-owner ethm1l7cstwtf2lvev27ka67c23yk7mmj8ad7tetpqc
auctions: auctions:
auctions: auctions:
@ -290,7 +290,7 @@ auctions:
### Query Account Balance ### Query Account Balance
``` ```
# ./build/ethermintd q auction balance # ./build/chibaclonkd q auction balance
balance: balance:
- amount: "20" - amount: "20"

View File

@ -5,17 +5,17 @@ $ make build
``` ```
# Setup Chain # Setup Chain
```bash ```bash
./build/ethermintd keys add root ./build/chibaclonkd keys add root
./build/ethermintd init test-moniker --chain-id ethermint_9000-1 ./build/chibaclonkd init test-moniker --chain-id ethermint_9000-1
./build/ethermintd add-genesis-account $(./build/ethermintd keys show root -a) 1000000000000000000aphoton,1000000000000000000stake ./build/chibaclonkd add-genesis-account $(./build/chibaclonkd keys show root -a) 1000000000000000000aphoton,1000000000000000000stake
./build/ethermintd gentx root 1000000000000000000stake --chain-id ethermint_9000-1 ./build/chibaclonkd gentx root 1000000000000000000stake --chain-id ethermint_9000-1
./build/ethermintd collect-gentxs ./build/chibaclonkd collect-gentxs
./build/ethermintd start ./build/chibaclonkd start
``` ```
# Params # Params
``` ```
$ ./build/ethermintd q bond params -o json | jq . $ ./build/chibaclonkd q bond params -o json | jq .
{ {
"params": { "params": {
@ -29,7 +29,7 @@ $ ./build/ethermintd q bond params -o json | jq .
# Create Bond # Create Bond
``` ```
$ ./build/ethermintd tx bond create 100aphoton --from root --chain-id $(./build/ethermintd status | jq .NodeInfo.network -r) $ ./build/chibaclonkd tx bond create 100aphoton --from root --chain-id $(./build/chibaclonkd status | jq .NodeInfo.network -r)
{"body":{"messages":[{"@type":"/vulcanize.bond.v1beta1.MsgCreateBond","signer":"ethm1mfdjngh5jvjs9lqtt9a7y2hlgw8v3syh3hsqzk","coins":[{"denom":"aphoton","amount":"100"}]}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":[]} {"body":{"messages":[{"@type":"/vulcanize.bond.v1beta1.MsgCreateBond","signer":"ethm1mfdjngh5jvjs9lqtt9a7y2hlgw8v3syh3hsqzk","coins":[{"denom":"aphoton","amount":"100"}]}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":[]}
@ -49,7 +49,7 @@ txhash: C6D362E11D4C9FB06D620F3CCAF363A69A074297A00E9CAECBDA5BE1CC302EB8
``` ```
# Refill Bond # Refill Bond
``` ```
$ ./build/ethermintd tx bond refill c3f7a78c5042d2003880962ba31ff3b01fcf5942960e0bc3ca331f816346a440 1000aphoton --from root --chain-id $(./build/ethermintd status | jq .NodeInfo.network -r) $ ./build/chibaclonkd tx bond refill c3f7a78c5042d2003880962ba31ff3b01fcf5942960e0bc3ca331f816346a440 1000aphoton --from root --chain-id $(./build/chibaclonkd status | jq .NodeInfo.network -r)
{"body":{"messages":[{"@type":"/vulcanize.bond.v1beta1.MsgRefillBond","id":"c3f7a78c5042d2003880962ba31ff3b01fcf5942960e0bc3ca331f816346a440","signer":"ethm1mfdjngh5jvjs9lqtt9a7y2hlgw8v3syh3hsqzk","coins":[{"denom":"aphoton","amount":"1000"}]}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":[]} {"body":{"messages":[{"@type":"/vulcanize.bond.v1beta1.MsgRefillBond","id":"c3f7a78c5042d2003880962ba31ff3b01fcf5942960e0bc3ca331f816346a440","signer":"ethm1mfdjngh5jvjs9lqtt9a7y2hlgw8v3syh3hsqzk","coins":[{"denom":"aphoton","amount":"1000"}]}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":[]}
confirm transaction before signing and broadcasting [y/N]: y confirm transaction before signing and broadcasting [y/N]: y
@ -69,7 +69,7 @@ txhash: 025B04E2C923EFE2299CD171B40829CB1FE4D1A69DA7563C64AAC3D5C27BDFC9
``` ```
# Withdraw from bond # Withdraw from bond
``` ```
$ ./build/ethermintd tx bond withdraw c3f7a78c5042d2003880962ba31ff3b01fcf5942960e0bc3ca331f816346a440 1000aphoton --from root --chain-id $(./build/ethermintd status | jq .NodeInfo.network -r) $ ./build/chibaclonkd tx bond withdraw c3f7a78c5042d2003880962ba31ff3b01fcf5942960e0bc3ca331f816346a440 1000aphoton --from root --chain-id $(./build/chibaclonkd status | jq .NodeInfo.network -r)
{"body":{"messages":[{"@type":"/vulcanize.bond.v1beta1.MsgWithdrawBond","id":"c3f7a78c5042d2003880962ba31ff3b01fcf5942960e0bc3ca331f816346a440","signer":"ethm1mfdjngh5jvjs9lqtt9a7y2hlgw8v3syh3hsqzk","coins":[{"denom":"aphoton","amount":"1000"}]}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":[]} {"body":{"messages":[{"@type":"/vulcanize.bond.v1beta1.MsgWithdrawBond","id":"c3f7a78c5042d2003880962ba31ff3b01fcf5942960e0bc3ca331f816346a440","signer":"ethm1mfdjngh5jvjs9lqtt9a7y2hlgw8v3syh3hsqzk","coins":[{"denom":"aphoton","amount":"1000"}]}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":[]}
confirm transaction before signing and broadcasting [y/N]: y confirm transaction before signing and broadcasting [y/N]: y
@ -88,7 +88,7 @@ txhash: 7C5E2FE674577CD6BFFF9F92FCCBC61EDFE8F1A00CE29AC84D58FB8F013D2F03
``` ```
# List Bond # List Bond
``` ```
$ ./build/ethermintd q bond list -o json | jq . $ ./build/chibaclonkd q bond list -o json | jq .
{ {
"bonds": [ "bonds": [
{ {
@ -108,7 +108,7 @@ txhash: 7C5E2FE674577CD6BFFF9F92FCCBC61EDFE8F1A00CE29AC84D58FB8F013D2F03
``` ```
# Get Bond by Id # Get Bond by Id
``` ```
$ ./build/ethermintd q bond get c3f7a78c5042d2003880962ba31ff3b01fcf5942960e0bc3ca331f816346a440 -o json | jq . $ ./build/chibaclonkd q bond get c3f7a78c5042d2003880962ba31ff3b01fcf5942960e0bc3ca331f816346a440 -o json | jq .
{ {
"bond": { "bond": {
"id": "c3f7a78c5042d2003880962ba31ff3b01fcf5942960e0bc3ca331f816346a440", "id": "c3f7a78c5042d2003880962ba31ff3b01fcf5942960e0bc3ca331f816346a440",
@ -126,7 +126,7 @@ $ ./build/ethermintd q bond get c3f7a78c5042d2003880962ba31ff3b01fcf5942960e0bc3
# Get Bond Module Balance # Get Bond Module Balance
``` ```
$ ./build/ethermintd q bond balance -o json | jq . $ ./build/chibaclonkd q bond balance -o json | jq .
{ {
"balance": [ "balance": [
{ {
@ -139,7 +139,7 @@ $ ./build/ethermintd q bond balance -o json | jq .
# Get Bonds By Owner # Get Bonds By Owner
``` ```
$ ./build/ethermintd q bond by-owner ethm1mfdjngh5jvjs9lqtt9a7y2hlgw8v3syh3hsqzk -o json | jq . $ ./build/chibaclonkd q bond by-owner ethm1mfdjngh5jvjs9lqtt9a7y2hlgw8v3syh3hsqzk -o json | jq .
{ {
"bonds": [ "bonds": [
{ {
@ -159,7 +159,7 @@ $ ./build/ethermintd q bond by-owner ethm1mfdjngh5jvjs9lqtt9a7y2hlgw8v3syh3hsqzk
# Cancel the bond # Cancel the bond
``` ```
$ ./build/ethermintd tx bond cancel c3f7a78c5042d2003880962ba31ff3b01fcf5942960e0bc3ca331f816346a440 --from root --chain-id $(./build/ethermintd status | jq .NodeInfo.network -r) $ ./build/chibaclonkd tx bond cancel c3f7a78c5042d2003880962ba31ff3b01fcf5942960e0bc3ca331f816346a440 --from root --chain-id $(./build/chibaclonkd status | jq .NodeInfo.network -r)
{"body":{"messages":[{"@type":"/vulcanize.bond.v1beta1.MsgCancelBond","id":"c3f7a78c5042d2003880962ba31ff3b01fcf5942960e0bc3ca331f816346a440","signer":"ethm1mfdjngh5jvjs9lqtt9a7y2hlgw8v3syh3hsqzk"}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":[]} {"body":{"messages":[{"@type":"/vulcanize.bond.v1beta1.MsgCancelBond","id":"c3f7a78c5042d2003880962ba31ff3b01fcf5942960e0bc3ca331f816346a440","signer":"ethm1mfdjngh5jvjs9lqtt9a7y2hlgw8v3syh3hsqzk"}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":[]}
confirm transaction before signing and broadcasting [y/N]: y confirm transaction before signing and broadcasting [y/N]: y
@ -180,7 +180,7 @@ txhash: 06440D0B35A862E3A6783E147F0E1CDD3374870DAE07E471D465E2830DAF7044
Note : After the bond create and withdraw bond and cancel bond , account amount needs change as per module Note : After the bond create and withdraw bond and cancel bond , account amount needs change as per module
``` ```
$ ./build/ethermintd q bank balances $(./build/ethermintd keys show root -a) -o json | jq . $ ./build/chibaclonkd q bank balances $(./build/chibaclonkd keys show root -a) -o json | jq .
{ {
"balances": [ "balances": [
{ {

View File

@ -8,18 +8,18 @@ $ make build
# Setup Chain # Setup Chain
```bash ```bash
./build/ethermintd keys add root ./build/chibaclonkd keys add root
./build/ethermintd init test-moniker --chain-id ethermint_9000-1 ./build/chibaclonkd init test-moniker --chain-id ethermint_9000-1
./build/ethermintd add-genesis-account $(./build/ethermintd keys show root -a) 1000000000000000000aphoton,1000000000000000000stake ./build/chibaclonkd add-genesis-account $(./build/chibaclonkd keys show root -a) 1000000000000000000aphoton,1000000000000000000stake
./build/ethermintd gentx root 1000000000000000000stake --chain-id ethermint_9000-1 ./build/chibaclonkd gentx root 1000000000000000000stake --chain-id ethermint_9000-1
./build/ethermintd collect-gentxs ./build/chibaclonkd collect-gentxs
./build/ethermintd start ./build/chibaclonkd start
``` ```
## Get Params ## Get Params
```bash ```bash
$ ./build/ethermintd q nameservice params -o json | jq . $ ./build/chibaclonkd q nameservice params -o json | jq .
{ {
"params": { "params": {
"record_rent": { "record_rent": {
@ -58,7 +58,7 @@ $ ./build/ethermintd q nameservice params -o json | jq .
> First you have to Create bond > First you have to Create bond
```bash ```bash
$ ./build/ethermintd tx nameservice set ~/Desktop/examples/records/example1.yml 95f68b1b862bfd1609b0c9aaf7300287b92fec90ac64027092c3e723af36e83d --from root --chain-id ethermint_9000-1 --yes -o json $ ./build/chibaclonkd tx nameservice set ~/Desktop/examples/records/example1.yml 95f68b1b862bfd1609b0c9aaf7300287b92fec90ac64027092c3e723af36e83d --from root --chain-id ethermint_9000-1 --yes -o json
{ {
"height": "0", "height": "0",
"txhash": "BA44ABE1194724694E7CB290F9F3121DB4E63E1A030D95CB84813EEA132CF95F", "txhash": "BA44ABE1194724694E7CB290F9F3121DB4E63E1A030D95CB84813EEA132CF95F",
@ -78,7 +78,7 @@ $ ./build/ethermintd tx nameservice set ~/Desktop/examples/records/example1.yml
## Get records list ## Get records list
```bash ```bash
$ ./build/ethermintd q nameservice list -o json | jq $ ./build/chibaclonkd q nameservice list -o json | jq
[ [
{ {
"id": "bafyreih7un2ntk235wshncebus5emlozdhdixrrv675my5umb6fgdergae", "id": "bafyreih7un2ntk235wshncebus5emlozdhdixrrv675my5umb6fgdergae",
@ -104,7 +104,7 @@ $ ./build/ethermintd q nameservice list -o json | jq
## Get record by id ## Get record by id
```bash ```bash
$ ./build/ethermintd q nameservice get bafyreih7un2ntk235wshncebus5emlozdhdixrrv675my5umb6fgdergae -o json | jq . $ ./build/chibaclonkd q nameservice get bafyreih7un2ntk235wshncebus5emlozdhdixrrv675my5umb6fgdergae -o json | jq .
{ {
"record": { "record": {
"id": "bafyreih7un2ntk235wshncebus5emlozdhdixrrv675my5umb6fgdergae", "id": "bafyreih7un2ntk235wshncebus5emlozdhdixrrv675my5umb6fgdergae",
@ -121,7 +121,7 @@ $ ./build/ethermintd q nameservice get bafyreih7un2ntk235wshncebus5emlozdhdixrrv
## Reserve name ## Reserve name
```bash ```bash
./build/ethermintd tx nameservice reserve-name hello --from root --chain-id ethermint_9000-1 --owner $(./build/ethermintd key ./build/chibaclonkd tx nameservice reserve-name hello --from root --chain-id ethermint_9000-1 --owner $(./build/chibaclonkd key
s show root -a) -y -o json | jq . s show root -a) -y -o json | jq .
{ {
"height": "0", "height": "0",
@ -143,7 +143,7 @@ s show root -a) -y -o json | jq .
## Query Whois for name authority ## Query Whois for name authority
```bash ```bash
./build/ethermintd q nameservice whois hello -o json | jq . ./build/chibaclonkd q nameservice whois hello -o json | jq .
{ {
"name_authority": { "name_authority": {
"owner_public_key": "Au3hH1tzL1KgZfXfA71jGYSe5RV9Wg95kwhBWs8V+N+h", "owner_public_key": "Au3hH1tzL1KgZfXfA71jGYSe5RV9Wg95kwhBWs8V+N+h",
@ -161,7 +161,7 @@ s show root -a) -y -o json | jq .
## Query the nameservice module balance ## Query the nameservice module balance
```bash ```bash
$ ./build/ethermintd q nameservice balance -o json | jq . $ ./build/chibaclonkd q nameservice balance -o json | jq .
{ {
"balances": [ "balances": [
{ {
@ -181,14 +181,14 @@ $ ./build/ethermintd q nameservice balance -o json | jq .
## add bond to the authority ## add bond to the authority
```bash ```bash
$ ./build/ethermintd tx nameservice authority-bond [Authority Name] [Bond ID ] --from root --chain-id ethermint_9000-1 -y -o json | jq . $ ./build/chibaclonkd tx nameservice authority-bond [Authority Name] [Bond ID ] --from root --chain-id ethermint_9000-1 -y -o json | jq .
$ ./build/ethermintd tx nameservice authority-bond hello 95f68b1b862bfd1609b0c9aaf7300287b92fec90ac64027092c3e723af36e83d --from root --chain-id ethermint_9000-1 -y -o json | jq . $ ./build/chibaclonkd tx nameservice authority-bond hello 95f68b1b862bfd1609b0c9aaf7300287b92fec90ac64027092c3e723af36e83d --from root --chain-id ethermint_9000-1 -y -o json | jq .
``` ```
## Query the records by associate bond id ## Query the records by associate bond id
```bash ```bash
$ ./build/ethermintd q nameservice query-by-bond 95f68b1b862bfd1609b0c9aaf7300287b92fec90ac64027092c3e723af36e83d -o json | jq . $ ./build/chibaclonkd q nameservice query-by-bond 95f68b1b862bfd1609b0c9aaf7300287b92fec90ac64027092c3e723af36e83d -o json | jq .
{ {
"records": [ "records": [
{ {
@ -209,7 +209,7 @@ $ ./build/ethermintd q nameservice query-by-bond 95f68b1b862bfd1609b0c9aaf730028
## dissociate bond from record ## dissociate bond from record
```bash ```bash
$ ./build/ethermintd tx nameservice dissociate-bond bafyreih7un2ntk235wshncebus5emlozdhdixrrv675my5umb6fgdergae --from root --chain-id ethermint_9000-1 $ ./build/chibaclonkd tx nameservice dissociate-bond bafyreih7un2ntk235wshncebus5emlozdhdixrrv675my5umb6fgdergae --from root --chain-id ethermint_9000-1
{"body":{"messages":[{"@type":"/vulcanize.nameservice.v1beta1.MsgDissociateBond","record_id":"bafyreih7un2ntk235wshncebus5emlozdhdixrrv675my5umb6fgdergae","signer":"ethm1mfdjngh5jvjs9lqtt9a7y2hlgw8v3syh3hsqzk"}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":[]} {"body":{"messages":[{"@type":"/vulcanize.nameservice.v1beta1.MsgDissociateBond","record_id":"bafyreih7un2ntk235wshncebus5emlozdhdixrrv675my5umb6fgdergae","signer":"ethm1mfdjngh5jvjs9lqtt9a7y2hlgw8v3syh3hsqzk"}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":[]}
confirm transaction before signing and broadcasting [y/N]: y confirm transaction before signing and broadcasting [y/N]: y
@ -231,7 +231,7 @@ txhash: 7AFEF524CB0D92D6576FC08601A787786E802449888FD8DDAA7635698CC85060
## Associate bond with record ## Associate bond with record
```bash ```bash
./build/ethermintd tx nameservice associate-bond bafyreih7un2ntk235wshncebus5emlozdhdixrrv675my5umb6fgdergae c3f7a78c5042d2003880962ba31ff3b01fcf5942960e0bc3ca331f816346a440 --from root --chain-id ethermint_9000-1 -y -o json | jq . ./build/chibaclonkd tx nameservice associate-bond bafyreih7un2ntk235wshncebus5emlozdhdixrrv675my5umb6fgdergae c3f7a78c5042d2003880962ba31ff3b01fcf5942960e0bc3ca331f816346a440 --from root --chain-id ethermint_9000-1 -y -o json | jq .
{ {
"height": "0", "height": "0",
"txhash": "F75C2BF2FE73668AE1332E1237F924AC549E31E822A56394DE5AC17200B199F9", "txhash": "F75C2BF2FE73668AE1332E1237F924AC549E31E822A56394DE5AC17200B199F9",
@ -252,7 +252,7 @@ txhash: 7AFEF524CB0D92D6576FC08601A787786E802449888FD8DDAA7635698CC85060
## dissociate-records => remove all record from bond ## dissociate-records => remove all record from bond
```bash ```bash
$./build/ethermintd tx nameservice dissociate-records c3f7a78c5042d2003880962ba31ff3b01fcf5942960e0bc3ca331f816346a440 --from root --chain-id ethermint_9000-1 -y -o json | jq . $./build/chibaclonkd tx nameservice dissociate-records c3f7a78c5042d2003880962ba31ff3b01fcf5942960e0bc3ca331f816346a440 --from root --chain-id ethermint_9000-1 -y -o json | jq .
{ {
"height": "0", "height": "0",
"txhash": "0316F503E5DEA47CB108AE6C7C7FFAF3F71CC56BC22F63CB97322E1BE48B33B9", "txhash": "0316F503E5DEA47CB108AE6C7C7FFAF3F71CC56BC22F63CB97322E1BE48B33B9",
@ -274,14 +274,14 @@ $./build/ethermintd tx nameservice dissociate-records c3f7a78c5042d2003880962ba3
> When a record is expires , needs to renew record > When a record is expires , needs to renew record
```bash ```bash
$ ./build/ethermintd tx nameservice renew-record bafyreih7un2ntk235wshncebus5emlozdhdixrrv675my5umb6fgdergae --from root --chain-id ethermint_9000-1 $ ./build/chibaclonkd tx nameservice renew-record bafyreih7un2ntk235wshncebus5emlozdhdixrrv675my5umb6fgdergae --from root --chain-id ethermint_9000-1
``` ```
## Set the authority name ## Set the authority name
```bash ```bash
$ ./build/ethermintd tx nameservice set-name wrn://hello/test test_hello_cid --from root --chain-id ethermint_9000-1 -y -o json | jq . $ ./build/chibaclonkd tx nameservice set-name wrn://hello/test test_hello_cid --from root --chain-id ethermint_9000-1 -y -o json | jq .
{ {
"height": "0", "height": "0",
"txhash": "66A63C73B076EEE9A2F7605354448EDEB161F0115D4D03AF68C01BA28DB97486", "txhash": "66A63C73B076EEE9A2F7605354448EDEB161F0115D4D03AF68C01BA28DB97486",
@ -301,7 +301,7 @@ $ ./build/ethermintd tx nameservice set-name wrn://hello/test test_hello_cid --
## Delete the name ## Delete the name
```bash ```bash
$./build/ethermintd tx nameservice delete-name wrn://hello/test --from root --chain-id ethermint_9000-1 -y $./build/chibaclonkd tx nameservice delete-name wrn://hello/test --from root --chain-id ethermint_9000-1 -y
code: 0 code: 0
codespace: "" codespace: ""
data: "" data: ""
@ -320,7 +320,7 @@ txhash: A3FF4C46BAC7BD6E54BBB743A49830AE8C6F6FE59282384789CBA323C1FE540C
## List of Authorities Expire Queue ## List of Authorities Expire Queue
```bash ```bash
$ ./build/ethermintd q nameservice authority-expiry -o json | jq . $ ./build/chibaclonkd q nameservice authority-expiry -o json | jq .
{ {
"authorities": [], "authorities": [],
"pagination": null "pagination": null
@ -331,7 +331,7 @@ $ ./build/ethermintd q nameservice authority-expiry -o json | jq .
## List of Records Expire Queue ## List of Records Expire Queue
```bash ```bash
$ ./build/ethermintd q nameservice record-expiry -o json | jq . $ ./build/chibaclonkd q nameservice record-expiry -o json | jq .
{ {
"records": [], "records": [],
"pagination": null "pagination": null