This is the repo for the Raiden Network at the TU BERLIN blockchain labs workshop. Below you'll find a list of links and information needed to get going with Raiden for the hackathon.
- Access to an Ethereum Görli RPC endpoint
- For example through Infura
- A Görli account and göETH. We've created a small tool that generates an account and sends göETH and tokens to it with just one simple command. Please see the onboarding section below for instructions.
- The Raiden client itself. Please see the getting Raiden section below.
- If you're on Windows we recommend that you install Raiden for Windows Subsystem for Linux (WSL)
We've created a simple script that generates a keystore / address and sends Görli ETH and TUBERLINBlockchainlabs-Tokens to the generated address. Follow these simple steps:
- Download the onboarder macOS binary:
curl -O https://raiden-nightlies.ams3.digitaloceanspaces.com/onboarder-macOS.zip- Unzip the file:
unzip onboarder-macOS.zip- And run it:
./onboarder- Download the onboarder linux binary:
curl -O https://raiden-nightlies.ams3.digitaloceanspaces.com/onboarder-linux.tar.gz- Extract the file:
tar -xvzf onboarder-linux.tar.gz- And run it:
./onboarderThe fastest way to get up and running is to use the latest stable binary releases. Just follow the instructions below.
- Download the latest stable macOS binary:
curl -L -O https://raiden-nightlies.ams3.digitaloceanspaces.com/raiden-v0.100.3-macOS-x86_64.zip- Unzip the file:
unzip raiden-v0.100.3-macOS-x86_64.zip- Download the latest stable linux binary:
curl -L -O https://raiden-nightlies.ams3.digitaloceanspaces.com/raiden-v0.100.3-linux-x86_64.tar.gz- Extract the file:
tar xvzf raiden-v0.100.3-linux-x86_64.tar.gzOnce Raiden is installed it's time to fire it up. This is done with the following command (Please make sure the replace raiden-binary with the actual binary you just extracted above):
./raiden-binary \
--keystore-path keystore \
--network-id goerli \
--gas-price fast \
--environment-type development \
--eth-rpc-endpoint https://goerli.infura.io/v3/YOUR_INFURA_TOKENThis is how it looks like for Linux:
./raiden-v0.100.3-linux-x86_64 --keystore-path keystore --network-id goerli --gas-price fast --environment-type development --eth-rpc-endpoint https://goerli.infura.io/v3/YOUR_INFURA_TOKENThe node will ask you to accept the disclaimer and then ask you to choose which address you want to use. The list should only contain the one address the onboarder tool generated for you.
It will take a bit of time for the node to finish launching. You'll see that it's ready once you see the message stating that the Rest-API has been started.
You can now access the WebUI at http://localhost:5001/.
You should now have running Raiden node. From here you can join the TUBERLINBlockchainlabs token network. You can also check out how the network is growing by checking out the Raiden Explorer for the TUBERLINBlockchainlabs token.
The first thing to do when Raiden is up and running is to open a channel with someone. You can do so by opening a channel with the node below, or to find another hacker building on Raiden and open a channel with him. For this you just have to replace the partner_address below with his/her address.
curl -i -X PUT http://localhost:5001/api/v1/channels \
-H 'Content-Type: application/json' --data-raw \
'{"partner_address": "0x2645bcF95d1c3fE89dB435be8AaEFb887832803b", \
"token_address": "0x9B740B496dea54d747680e941921aD28BDA5789C", \
"total_deposit": 10000000000000000000}'If you ever need to top up a channel, you can use the following command:
curl -i -X PATCH http://localhost:5001/api/v1/channels/ \
0x9B740B496dea54d747680e941921aD28BDA5789C/ADDRESS_OF_PARTNER \
-H 'Content-Type: application/json' \
--data-raw '{"total_deposit": 15000000000000000000}'To make payments, choose the address of the partner you've opened a channel with and do the following:
curl -i -X POST http://localhost:5001/api/v1/payments/ \
0x9B740B496dea54d747680e941921aD28BDA5789C/ADDRESS_OF_RECEIVER \
-H 'Content-Type: application/json' --data-raw '{"amount": 100000}'Feel free to change the amounts of the payments.