forked from cerc-io/laconicd-deprecated
conflicts
This commit is contained in:
@@ -10,7 +10,7 @@ Increasingly difficult tests are provided:
|
||||
|
||||
### Quick start
|
||||
|
||||
**Prerequisite**: in the repo's root, run `make install` to install the `ethermintd` and `ethermintcli` binaries. When done, come back to this directory.
|
||||
**Prerequisite**: in the repo's root, run `make install` to install the `ethermintd` and `ethermintd` binaries. When done, come back to this directory.
|
||||
|
||||
**Prerequisite**: install the individual solidity packages. They're set up as individual reops in a yarn monorepo workspace. Install them all via `yarn install`.
|
||||
|
||||
@@ -22,10 +22,10 @@ In the first, run `ethermintd`:
|
||||
./init-test-node.sh
|
||||
```
|
||||
|
||||
In the second, run `ethermintcli` as mentioned in the script's output:
|
||||
In the second, run `ethermintd` as mentioned in the script's output:
|
||||
|
||||
```sh
|
||||
ethermintcli rest-server --laddr "tcp://localhost:8545" --unlock-key localkey,user1,user2 --chain-id "ethermint-1337" --trace --wsport 8546
|
||||
ethermintd rest-server --laddr "tcp://localhost:8545" --unlock-key localkey,user1,user2 --chain-id "ethermint-1337" --trace --wsport 8546
|
||||
```
|
||||
|
||||
You will now have three ethereum accounts unlocked in the test node:
|
||||
@@ -36,7 +36,7 @@ You will now have three ethereum accounts unlocked in the test node:
|
||||
|
||||
From here, in your other available terminal, go into any of the tests and run `yarn test-ethermint`. You should see `ethermintd` accepting transactions and producing blocks. You should be able to query for any transaction via:
|
||||
|
||||
- `ethermintcli query tx <cosmos-sdk tx>`
|
||||
- `ethermintd query tx <cosmos-sdk tx>`
|
||||
- `curl localhost:8545 -H "Content-Type:application/json" -X POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["<ethereum tx>"],"id":1}'`
|
||||
|
||||
And obviously more, via the Ethereum JSON-RPC API).
|
||||
@@ -56,7 +56,7 @@ The [`init-test-node.sh`](./init-test-node.sh) script sets up ethermint with the
|
||||
|
||||
Each with roughly 100 ETH available (1e18 photon).
|
||||
|
||||
Running `ethermintcli list keys` should output:
|
||||
Running `ethermintd list keys` should output:
|
||||
|
||||
```json
|
||||
[
|
||||
|
||||
@@ -3,41 +3,35 @@
|
||||
CHAINID="ethermint-1337"
|
||||
MONIKER="localtestnet"
|
||||
|
||||
# localKey address 0x7cb61d4117ae31a12e393a1cfa3bac666481d02e
|
||||
VAL_KEY="localkey"
|
||||
VAL_MNEMONIC="gesture inject test cycle original hollow east ridge hen combine junk child bacon zero hope comfort vacuum milk pitch cage oppose unhappy lunar seat"
|
||||
|
||||
# user1 address 0xc6fe5d33615a1c52c08018c47e8bc53646a0e101
|
||||
USER1_KEY="user1"
|
||||
USER1_MNEMONIC="copper push brief egg scan entry inform record adjust fossil boss egg comic alien upon aspect dry avoid interest fury window hint race symptom"
|
||||
|
||||
# user2 address 0x963ebdf2e1f8db8707d05fc75bfeffba1b5bac17
|
||||
USER2_KEY="user2"
|
||||
USER2_MNEMONIC="maximum display century economy unlock van census kite error heart snow filter midnight usage egg venture cash kick motor survey drastic edge muffin visual"
|
||||
|
||||
# remove existing daemon and client
|
||||
rm -rf ~/.ethermint*
|
||||
|
||||
ethermintcli config keyring-backend test
|
||||
|
||||
# Set up config for CLI
|
||||
ethermintcli config chain-id $CHAINID
|
||||
ethermintcli config output json
|
||||
ethermintcli config indent true
|
||||
ethermintcli config trust-node true
|
||||
|
||||
# Import keys from mnemonics
|
||||
echo $VAL_MNEMONIC | ethermintcli keys add $VAL_KEY --recover
|
||||
echo $USER1_MNEMONIC | ethermintcli keys add $USER1_KEY --recover
|
||||
echo $USER2_MNEMONIC | ethermintcli keys add $USER2_KEY --recover
|
||||
echo $VAL_MNEMONIC | ethermintd keys add $VAL_KEY --recover --keyring-backend test --algo "eth_secp256k1"
|
||||
echo $USER1_MNEMONIC | ethermintd keys add $USER1_KEY --recover --keyring-backend test --algo "eth_secp256k1"
|
||||
echo $USER2_MNEMONIC | ethermintd keys add $USER2_KEY --recover --keyring-backend test --algo "eth_secp256k1"
|
||||
|
||||
# Set moniker and chain-id for Ethermint (Moniker can be anything, chain-id must be an integer)
|
||||
ethermintd init $MONIKER --chain-id $CHAINID
|
||||
|
||||
# Allocate genesis accounts (cosmos formatted addresses)
|
||||
ethermintd add-genesis-account $(ethermintcli keys show $VAL_KEY -a) 1000000000000000000000aphoton,10000000000000000stake
|
||||
ethermintd add-genesis-account $(ethermintcli keys show $USER1_KEY -a) 1000000000000000000000aphoton,10000000000000000stake
|
||||
ethermintd add-genesis-account $(ethermintcli keys show $USER2_KEY -a) 1000000000000000000000aphoton,10000000000000000stake
|
||||
ethermintd add-genesis-account "$(ethermintd keys show $VAL_KEY -a --keyring-backend test)" 1000000000000000000000aphoton,1000000000000000000stake --keyring-backend test
|
||||
ethermintd add-genesis-account "$(ethermintd keys show $USER1_KEY -a --keyring-backend test)" 1000000000000000000000aphoton,1000000000000000000stake --keyring-backend test
|
||||
ethermintd add-genesis-account "$(ethermintd keys show $USER2_KEY -a --keyring-backend test)" 1000000000000000000000aphoton,1000000000000000000stake --keyring-backend test
|
||||
|
||||
# Sign genesis transaction
|
||||
ethermintd gentx --name $VAL_KEY --keyring-backend test
|
||||
ethermintd gentx $VAL_KEY 1000000000000000000stake --amount=1000000000000000000000aphoton --chain-id $CHAINID --keyring-backend test
|
||||
|
||||
# Collect genesis tx
|
||||
ethermintd collect-gentxs
|
||||
@@ -45,9 +39,5 @@ ethermintd collect-gentxs
|
||||
# Run this to ensure everything worked and that the genesis file is setup correctly
|
||||
ethermintd validate-genesis
|
||||
|
||||
# Command to run the rest server in a different terminal/window
|
||||
echo -e '\nrun the following command in a different terminal/window to run the REST server and JSON-RPC:'
|
||||
echo -e "ethermintcli rest-server --laddr \"tcp://localhost:8545\" --wsport 8546 --unlock-key $VAL_KEY,$USER1_KEY,$USER2_KEY --chain-id $CHAINID --trace\n"
|
||||
|
||||
# Start the node (remove the --pruning=nothing flag if historical queries are not needed)
|
||||
ethermintd start --pruning=nothing --rpc.unsafe --log_level "main:info,state:info,mempool:info" --trace
|
||||
ethermintd start --pruning=nothing --rpc.unsafe --rpc-api "web3, eth, personal, net" --keyring-backend test --trace --log_level "info"
|
||||
|
||||
@@ -4,13 +4,16 @@
|
||||
"author": "Aragon Association <contact@aragon.org>",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"scripts": {
|
||||
"contract-compile": "yarn truffle compile",
|
||||
"contract-migrate": "yarn truffle migrate --network ethermint",
|
||||
"test-ganache": "yarn truffle test",
|
||||
"test-ethermint": "yarn truffle test --network ethermint"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@aragon/contract-helpers-test": "^0.1.0",
|
||||
"chai": "^4.2.0",
|
||||
"truffle": "^5.1.42",
|
||||
"web3": "^1.2.11"
|
||||
"truffle": "^5.2.5",
|
||||
"web3": "^1.3.4",
|
||||
"sleep": "^6.3.0"
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user