Skip to content

one line command to start godwoken-polyjuice chain.

Notifications You must be signed in to change notification settings

rumblefishdev/godwoken-kicker

 
 

Repository files navigation

Godwoken-Kicker

one line command to start godwoken-polyjuice chain for devnet.

How to run

## quick-mode

use prebuild scripts and binary from docker images, 
fast and simple

## custom-mode

use manual-build scripts and binary via local submodules,
more flexible, for more custom needs

eg: you can use manual mode to debug with
- godwoken
- godwoken-web3
- godwoken-scripts
- godwoken-polyjuice

by default, we ship the components with the same version in both quick-mode(under prebuild-docker-image) and custom-mode(under local submodule folder). you can checkout the specific version information for all components in the release tags descriptions.

1. quick mode

make sure you have docker and docker-compose install on your machine.

    docker --version
    docker-compose --version

clone the code:

git clone https://github.com/RetricSu/godwoken-kicker.git
cd godwoken-kicker 

when you run first time, or everytime after you change mode, please do:

make init

then you can start godwoken-polyjuice chain by simply running:

make start

you can monitor godwoken and polyjuice backend real-time activities:

make sp # sp means show polyjuice activities
make sg # sg means show godwoken activities

after everything started, check http://localhost:6100/ to deploy contract.

panel

you will need to change your Metamask network setting like following:

    Network Name: Godwoken
    New RPC URL: http://localhost:8024
    Chain ID: 0x100000003

2. custom mode

- build custom components on manual

open /docker/.build.mode.env file, under the [mode] section, set the component you want to true

####[mode]
MANUAL_BUILD_GODWOKEN=false
MANUAL_BUILD_WEB3=false
MANUAL_BUILD_SCRIPTS=false
MANUAL_BUILD_POLYJUICE=false

then run

make init
make start

and the component will be build and run through submodule on manual.

- set custom submodule for component

you can also change different submodule of components if you want.

by running

make gen-submodule-env

you can have a quick overview about current submodules info at /docker/.submodule.list.env:

####[godwoken]
#info: tags/v0.2.4-0-gdd58925, dd58925 fix(web3-indexer): Transaction data and v format
GODWOKEN_URL=https://github.com/nervosnetwork/godwoken.git
GODWOKEN_BRANCH=master
GODWOKEN_COMMIT=dd58925

####[godwoken-web3]
#info: tags/v0.2.2-0-g0324166, 0324166 Merge pull request #5 from nervosnetwork/fix-bugs
GODWOKEN_WEB3_URL=https://github.com/nervosnetwork/godwoken-web3.git
GODWOKEN_WEB3_BRANCH=main
GODWOKEN_WEB3_COMMIT=0324166

....

you can change the submodule info (like remote url/branch/commit) to fetch your own submodule.

just run the follwoing command after you edit the /docker/.submodule.list.env file.

make update-submodule

then you can check submodule again to ensure it indeed updated as you want:

make gen-submodule-env

NOTE: this will remove all local file in submodule. so all your local changed will gone.

How to deploy contract

  1. CHANGE YOUR METAMASK NETWORK to GODWOKEN!
  2. open http://localhost:6100/, connect with your metamask address
  3. click Deposit button to fund some devnet ckb on your metamask address.
  4. after deposit finished,
    • click Deploy Contract button
    • select the contract compiled binary file from your computer
    • sign the message with metamask

then the deployment will auto start.

after deployment successfully get done, you will find the contract address listing below.

How to test dapp

read doc here.

you can use the kicker's built-in Contract Debugger right on the page to give your dapp a first simple manual test.

panel

Some useful command

make stop # stop the godwoken-polyjuice chain and everything related. (but not remove data) 
make start # start the godwoken-polyjuice chain service.
make start-f # force start. the default command `make start` will not deploy a new godwoken chain if it exits, use start-f if you want to deploy a new chain.
make clean # this will clean the ckb chain data and every other layer1-related cache data(eg: ckb-indexer data/ckb-cli data/lumos cache data) as well
make down # equals `docker-compose down`, down all the service 

so if you want to have a fresh start, you can run:

make down
make clean
make start-f

About

one line command to start godwoken-polyjuice chain.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 70.4%
  • Makefile 23.7%
  • Dockerfile 5.9%