2021-07-26 07:52:17 +00:00
|
|
|
|
2022-10-10 10:38:33 +00:00
|
|
|
rem ethermint compile on windows
|
2021-07-26 07:52:17 +00:00
|
|
|
rem install golang , gcc, sed for windows
|
|
|
|
rem 1. install msys2 : https://www.msys2.org/
|
|
|
|
rem 2. pacman -S mingw-w64-x86_64-toolchain
|
|
|
|
rem pacman -S sed
|
|
|
|
rem pacman -S mingw-w64-x86_64-jq
|
|
|
|
rem 3. add path C:\msys64\mingw64\bin
|
|
|
|
rem C:\msys64\usr\bin
|
|
|
|
|
|
|
|
set KEY="mykey"
|
2023-01-04 06:23:28 +00:00
|
|
|
set CHAINID="laconic_9000-1"
|
2021-07-26 07:52:17 +00:00
|
|
|
set MONIKER="localtestnet"
|
|
|
|
set KEYRING="test"
|
|
|
|
set KEYALGO="eth_secp256k1"
|
|
|
|
set LOGLEVEL="info"
|
2021-08-05 09:10:36 +00:00
|
|
|
rem to trace evm
|
|
|
|
rem TRACE="--trace"
|
2021-07-26 07:52:17 +00:00
|
|
|
set TRACE=""
|
2022-10-13 05:53:17 +00:00
|
|
|
set HOME=%USERPROFILE%\.laconicd
|
2021-07-26 07:52:17 +00:00
|
|
|
echo %HOME%
|
|
|
|
set ETHCONFIG=%HOME%\config\config.toml
|
|
|
|
set GENESIS=%HOME%\config\genesis.json
|
|
|
|
set TMPGENESIS=%HOME%\config\tmp_genesis.json
|
|
|
|
|
|
|
|
@echo build binary
|
2022-10-13 05:53:17 +00:00
|
|
|
go build .\cmd\laconicd
|
2021-07-26 07:52:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
@echo clear home folder
|
|
|
|
del /s /q %HOME%
|
|
|
|
|
2022-10-13 05:53:17 +00:00
|
|
|
laconicd config keyring-backend %KEYRING%
|
|
|
|
laconicd config chain-id %CHAINID%
|
2021-07-26 07:52:17 +00:00
|
|
|
|
2022-10-13 05:53:17 +00:00
|
|
|
laconicd keys add %KEY% --keyring-backend %KEYRING% --algo %KEYALGO%
|
2021-07-26 07:52:17 +00:00
|
|
|
|
2022-10-10 10:38:33 +00:00
|
|
|
rem Set moniker and chain-id for Ethermint (Moniker can be anything, chain-id must be an integer)
|
2022-10-13 05:53:17 +00:00
|
|
|
laconicd init %MONIKER% --chain-id %CHAINID%
|
2021-07-26 07:52:17 +00:00
|
|
|
|
|
|
|
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[\"crisis\"][\"constant_fee\"][\"denom\"]=\"aphoton\"" > %TMPGENESIS% && move %TMPGENESIS% %GENESIS%
|
|
|
|
cat %GENESIS% | jq ".app_state[\"gov\"][\"deposit_params\"][\"min_deposit\"][0][\"denom\"]=\"aphoton\"" > %TMPGENESIS% && move %TMPGENESIS% %GENESIS%
|
|
|
|
cat %GENESIS% | jq ".app_state[\"mint\"][\"params\"][\"mint_denom\"]=\"aphoton\"" > %TMPGENESIS% && move %TMPGENESIS% %GENESIS%
|
|
|
|
|
|
|
|
rem increase block time (?)
|
|
|
|
cat %GENESIS% | jq ".consensus_params[\"block\"][\"time_iota_ms\"]=\"30000\"" > %TMPGENESIS% && move %TMPGENESIS% %GENESIS%
|
|
|
|
|
|
|
|
rem gas limit in genesis
|
|
|
|
cat %GENESIS% | jq ".consensus_params[\"block\"][\"max_gas\"]=\"10000000\"" > %TMPGENESIS% && move %TMPGENESIS% %GENESIS%
|
|
|
|
|
|
|
|
rem setup
|
|
|
|
sed -i "s/create_empty_blocks = true/create_empty_blocks = false/g" %ETHCONFIG%
|
|
|
|
|
|
|
|
rem Allocate genesis accounts (cosmos formatted addresses)
|
2022-10-13 05:53:17 +00:00
|
|
|
laconicd add-genesis-account %KEY% 100000000000000000000000000aphoton --keyring-backend %KEYRING%
|
2021-07-26 07:52:17 +00:00
|
|
|
|
|
|
|
rem Sign genesis transaction
|
2022-10-13 05:53:17 +00:00
|
|
|
laconicd gentx %KEY% 1000000000000000000000aphoton --keyring-backend %KEYRING% --chain-id %CHAINID%
|
2021-07-26 07:52:17 +00:00
|
|
|
|
|
|
|
rem Collect genesis tx
|
2022-10-13 05:53:17 +00:00
|
|
|
laconicd collect-gentxs
|
2021-07-26 07:52:17 +00:00
|
|
|
|
|
|
|
rem Run this to ensure everything worked and that the genesis file is setup correctly
|
2022-10-13 05:53:17 +00:00
|
|
|
laconicd validate-genesis
|
2021-07-26 07:52:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rem Start the node (remove the --pruning=nothing flag if historical queries are not needed)
|
2022-10-13 05:53:17 +00:00
|
|
|
laconicd start --pruning=nothing %TRACE% --log_level %LOGLEVEL% --minimum-gas-prices=0.0001aphoton
|