Follow these steps to prepare a local development environment 🛠️
Checkout code
git clone --recursive https://github.com/Kylin-Network/kylin-node.git
Build debug version
cd kylin-node
cargo build
Build release version
cd kylin-node
cargo build --release
Build debug version
docker build -f Dockerfile -t kylin-node .
docker run -p "9944:9944" -p "9933:9933" -p "9615:9615" -p "30333:30333" kylin-node:latest bash -c "/kylin-node --dev --ws-external --rpc-external --rpc-methods Unsafe"
Using Kylin Market Front End which can be used to interact with Kylin Node.
git clone https://github.com/Kylin-Network/kylin-market-frontend.git
cd ./kylin-market-frontend
yarn install
Purge any existing dev chain state:
./target/debug/kylin-node purge-chain --dev
Start a dev chain:
./target/debug/kylin-node --dev
or, start a dev chain with detailed logging:
RUST_LOG=debug RUST_BACKTRACE=1 ./target/debug/kylin-node -lruntime=debug --dev
replace debug
with release
.
Caution! Donot try to run release
version everytime, it will take lots of time.
visit https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944#/settings/developer.
fill the config in Settings>>Developer.
{
"Address": "<AccountId>",
"LookupSource": "<AccountId>",
"DataInfo": {
"url": "Text",
"data": "Text"
}
}
Run ./scripts/insert_alice_key.sh
to insert OCW signer. If the OCW signer does not have enough balance, please charge money as following instructions.
Select Developer>>Extrinsics, then using priceFetchModule.addFetchDataRequest(url), type a url encode hex format.
Select Developer>>Chain state, then using priceFetchModule.requestedOffchainData(u64), press +.