Following packages are required.
Note:
If the Operation System is Windows, please run the below commands from gitbash.
Execute the following scripts:
$ ./1.prepare.sh
$ ./2.start.sh
It deployes 1 KCN network by default.
You can change two parameters in 1.prepare.sh
.
Parameter | Description |
---|---|
CHAIN_ID | The chain ID of the deployed chain. (Default:203) |
NETWORK_ID | The network ID of the deployed chain. It would be better to set this value to the same value of CHAIN_ID for simplicity. (Default:203) |
NUM_CNS | Number of CNs of the network. (Default:1) |
PRIVATE_KEY | The private key of the genesis account having all KLAY. If not set, it is auto-generated. |
ADDRESS | The address of the genesis account. This address must be matched to PRIVATE_KEY. |
To check out the local Klaytn network is working well, first check the status of the docker containers. To do that, execute the following command:
$ ./3.status.sh
After executing 2.start.sh
, it prints logs for the klaytn network.
If you want to print out the logs in another shell, execute the following command:
$ ./4.logs.sh
To stop the network to reduce resource utilzation of your machine, execute the following command:
$ ./5.stop.sh
To resume the stopped network, execute the following command:
$ ./6.resume.sh
To terminate all the resources in your machine, execute the following command:
$ ./7.terminate.sh
Note All the transactions and blocks you made will be lost.
KlaytnIDE is an IDE (Integrated Development Environment) for Klaytn.
By changing Environment on the "Run" tab to "Caver Provider" with http://localhost:8551
,
you can easily connect to the local Klaytn network. Enjoy developing!