Skip to content

Commit

Permalink
Update README and refactor local scripts
Browse files Browse the repository at this point in the history
The README file is updated to improve project description and guidance. Local environment setup and command scripts have also been refactored and moved to the 'scripts' directory.
  • Loading branch information
Noooblien committed May 30, 2024
1 parent 4ea8f58 commit 711c194
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 65 deletions.
69 changes: 36 additions & 33 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,55 @@
# stationevm
**stationevm** is a blockchain built using Cosmos SDK and Tendermint and created with [Ignite CLI](https://ignite.com/cli).
# EVM station

## Get started
## Introduction

```
ignite chain serve
```
The Ethereum Virtual Machine (EVM)-based Cosmos Chain represents a groundbreaking platform in the blockchain sphere, specifically designed for the creation and deployment of decentralized applications (DApps) and smart contracts. This platform is a harmonious blend of the scalability provided by the Cosmos network and the adaptability and widespread acceptance of the Ethereum Virtual Machine (EVM). It is engineered to cater to blockchain developers who are seeking a robust and flexible environment for their innovations.

`serve` command installs dependencies, builds, initializes, and starts your blockchain in development.
At its core, this platform offers a unique proposition: it combines the high-performance infrastructure of Cosmos, known for its inter-blockchain communication and scalability, with the powerful and versatile programming capabilities of the EVM. This integration allows developers to build sophisticated and efficient DApps and smart contracts that can leverage the best of both worlds.

### Configure

Your blockchain in development can be configured with `config.yml`. To learn more, see the [Ignite CLI docs](https://docs.ignite.com).
## Prerequisites
The project requires:

### Web Frontend
- [Go](https://golang.org/dl/) (Version 1.22 or later)
- [jq](https://stedolan.github.io/jq/download/): A lightweight and flexible command-line JSON processor.

Ignite CLI has scaffolded a Vue.js-based web app in the `vue` directory. Run the following commands to install dependencies and start the app:

## Getting Started

- To begin using this project, firstly clone this repository to your local machine.
```shell
git clone https://github.com/airchains-network/evm-station
cd evm-station;
go mod tidy;
```
cd vue
npm install
npm run serve
```

The frontend app is built using the `@starport/vue` and `@starport/vuex` packages. For details, see the [monorepo for Ignite front-end development](https://github.com/ignite/web).

## Release
To release a new version of your blockchain, create and push a new tag with `v` prefix. A new draft release with the configured targets will be created.

## Running the project

- To setup the project, execute the following command:
```shell
/bin/bash ./scripts/local-setup.sh
```
git tag v0.1
git push origin v0.1

- To Start the station, execute the following command:
```shell
/bin/bash ./scripts/local-start.sh
```

After a draft release is created, make your final changes from the release page and publish it.
- To Get the Private Keys of the EVM Chain, execute the following command:
```shell
/bin/bash ./scripts/local-keys.sh
```

### Install
To install the latest version of your blockchain node's binary, execute the following command on your machine:

```
curl https://get.ignite.com/username/station-evm@latest! | sudo bash
```
`username/station-evm` should match the `username` and `repo_name` of the Github repository to which the source code was pushed. Learn more about [the install process](https://github.com/allinbits/starport-installer).

## Learn more
## Contributing
Contributions are greatly appreciated. You can make contributions by creating issues, fixing bugs, or suggesting new features. Feel free to fork this repository and create pull requests to affect changes.


## License
This project is licensed under the MIT license - see the [LICENSE](LICENSE) file for more information.

- [Ignite CLI](https://ignite.com/cli)
- [Tutorials](https://docs.ignite.com/guide)
- [Ignite CLI docs](https://docs.ignite.com)
- [Cosmos SDK docs](https://docs.cosmos.network)
- [Developer Chat](https://discord.gg/ignite)
## Contact
For any inquiries or constructive feedback, please contact this email [email protected]
3 changes: 1 addition & 2 deletions privateKey.sh → scripts/local-keys.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

CHAINID="${CHAIN_ID:-aircaiks_9000-1}"
CHAINID="${CHAIN_ID:-stationevm_9000-100}"
MONIKER="localtestnet"
# Remember to change to other types of keyring like 'file' in-case exposing to outside world,
# otherwise your balance will be wiped quickly
Expand All @@ -24,5 +24,4 @@ GENESIS=$HOMEDIR/config/genesis.json
TMP_GENESIS=$HOMEDIR/config/tmp_genesis.json
VAL_KEY="mykey"


./build/station-evm keys unsafe-export-eth-key "$VAL_KEY" --keyring-backend "$KEYRING"
31 changes: 1 addition & 30 deletions local.sh → scripts/local-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ HOMEDIR="$HOME/.evmosd"
# to trace evm
#TRACE="--trace"
TRACE=""

# feemarket params basefee
BASEFEE=1000000000

VAL_KEY="mykey"
# Path variables
CONFIG=$HOMEDIR/config/config.toml
APP_TOML=$HOMEDIR/config/app.toml
Expand Down Expand Up @@ -83,43 +82,15 @@ if [[ $overwrite == "y" || $overwrite == "Y" ]]; then
# Remove the previous folder
rm -rf "$HOMEDIR"

# Set client config
# evmosd config keyring-backend "$KEYRING" --home "$HOMEDIR"
# evmosd config

# myKey address 0x7cb61d4117ae31a12e393a1cfa3bac666481d02e | evmos10jmp6sgh4cc6zt3e8gw05wavvejgr5pwjnpcky
VAL_KEY="mykey"
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"

# dev0 address 0xc6fe5d33615a1c52c08018c47e8bc53646a0e101 | evmos1cml96vmptgw99syqrrz8az79xer2pcgp84pdun
USER1_KEY="dev0"
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"

# dev1 address 0x963ebdf2e1f8db8707d05fc75bfeffba1b5bac17 | evmos1jcltmuhplrdcwp7stlr4hlhlhgd4htqh3a79sq
USER2_KEY="dev1"
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"

# dev2 address 0x40a0cb1C63e026A81B55EE1308586E21eec1eFa9 | evmos1gzsvk8rruqn2sx64acfsskrwy8hvrmafqkaze8
USER3_KEY="dev2"
USER3_MNEMONIC="will wear settle write dance topic tape sea glory hotel oppose rebel client problem era video gossip glide during yard balance cancel file rose"

# dev3 address 0x498B5AeC5D439b733dC2F58AB489783A23FB26dA | evmos1fx944mzagwdhx0wz7k9tfztc8g3lkfk6rrgv6l
USER4_KEY="dev3"
USER4_MNEMONIC="doll midnight silk carpet brush boring pluck office gown inquiry duck chief aim exit gain never tennis crime fragile ship cloud surface exotic patch"

# Import keys from mnemonics
echo "$VAL_MNEMONIC" | ./build/station-evm keys add "$VAL_KEY" --keyring-backend "$KEYRING" --algo "$KEYALGO" --home "$HOMEDIR"

echo "$HOMEDIR"
# Set moniker and chain-id for Evmos (Moniker can be anything, chain-id must be an integer)
./build/station-evm init $MONIKER -o --chain-id "$CHAINID" --home "$HOMEDIR"

# Change parameter token denominations to aevmos
jq '.app_state["staking"]["params"]["bond_denom"]="aevmos"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS"
jq '.app_state["gov"]["deposit_params"]["min_deposit"][0]["denom"]="aevmos"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS"



# Set gas limit in genesis
jq '.consensus_params["block"]["max_gas"]="400000000"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS"

Expand Down
File renamed without changes.

0 comments on commit 711c194

Please sign in to comment.