Skip to content

klaytn/local-klaytn-deploy

Repository files navigation

Local Deployment Tool for Klaytn

Deploying the local Network

Prerequisites

Following packages are required.

  1. Docker
  2. Docker-compose
Note: 
If the Operation System is Windows, please run the below commands from gitbash.

Starting the Klaytn Network

Execute the following scripts:

$ ./1.prepare.sh
$ ./2.start.sh

It deployes 1 KCN network by default.

Chainging parameters

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.

Checking out the Status of the Network

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

Getting logs

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

Stopping the Network

To stop the network to reduce resource utilzation of your machine, execute the following command:

$ ./5.stop.sh

Resuming the Network

To resume the stopped network, execute the following command:

$ ./6.resume.sh

Terminate the Network

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.

Developing Smart Contracts on the Local Network

Using KlaytnIDE

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!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages