#
Run a Worker - Quick Start
#
Clone autoloop-worker repo
gh repo clone LuckyMachines/autoloop-worker
#
Move into directory
cd autoloop-worker
#
Install dependencies
yarn
#
Set Credentials
- Create a
.env
file with RPC URL & wallet private key (see.env-example
)
cp .env-example .env
PRIVATE_KEY_TESTNET=<YOUR TESTNET PRIVATE KEY>
CHAIN_ID_TESTNET=71401
RPC_URL_TESTNET=https://v1.testnet.godwoken.io/rpc
PRIVATE_KEY=<YOUR PRIVATE KEY>
CHAIN_ID=71402
RPC_URL=https://v1.mainnet.godwoken.io/rpc
#
Create controller.config.json
cp controller.config.example.json controller.config.json
{
"test": {
"network": "godwoken_test",
"allowList": [],
"blockList": []
},
"main": {
"network": "godwoken",
"allowList": [],
"blockList": []
},
"testMode": true
}
#
Register worker
- Register wallet as AutoLoop worker. Make sure you have enough CKB to cover the registration fee (0.001 + tx gas). This fee is refunded immediately, but must be present to verify funds can be transferred to the worker.
yarn register-controller
#
Run your worker
yarn start