Monitoring of Raiden Network Payment Channels.
- Observe and list the
ChannelOpened
,ChannelClosed
andChannelSettled
events emitted by the smart contract - Keep a list of the open raiden channels
- List should update as new events are observed
- Write either in TypeScript or JavaScript
- Use any of the following frameworks:
Vue.js, React,Angular - Build using a testable architecture
- Manage state (easy-peasy + use of react context and hooks)
- Provide tests: some tests are written but of course more are to be written
- Query smart contract state history using a The Graph's subgraph
- Filter by channel state (open, closed, settled)
- Filter by channel's participant address
This project is made of 3 packages:
Smart contracts .sol
file, ABIs .json
files, contracts addresses, local smart contracts development
Fork of the default create-react-app template
The Graph is a tool for for indexing events emitted on the Ethereum blockchain. It provides you with an easy-to-use GraphQL API. To learn more, check out the The Graph documentation
Deployed Raiden Channels Subgraph
Caveat:
By default query responses are limited to 100 items per collection. If you want to receive more, you can go up to 1000 items per collection and beyond that you can paginate. See thegraph faq
Owing to this dependency on Yarn Workspaces, Create Eth App can't be used with npm.
Each script can be run either from the root folder with yarn [package]:[script]
or from within a package folder with yarn [script]
.
Package | Script | Description |
---|---|---|
contracts | ganache | Starts a local blockchain (deterministic, goerli, port 8545) with ganache-cli. |
contracts | test | [dev branch only, after using the ganache script] Deploys contracts (ERC20, SecretRegistry and TokenNetwork. Opens a channel. Watch event. |
contracts | openchannel | [dev branch only, after using the ganache and test scripts] Executes the openChannel function of TokenNetwork.sol to fire an OpenedChannel event. |
react-app | start | Runs the React app in development mode at http://localhost:3000. |
react-app | test | Runs the React test watcher in an interactive mode. |
react-app | build | Builds the React app for production to packages/react-app/build . |
react-app | eject | Remove the single build dependency from your React package. |
subgraph | codegen | Generates AssemblyScript types for smart contract ABIs and the subgraph schema. |
subgraph | build | Compiles the subgraph to WebAssembly |
subgraph | auth | Before deploying your subgraph, you need to sign up on the Graph Explorer. You will need to provide your access token |
subgraph | deploy | Deploys the subgraph to the official Graph Node. |
- Open Zeppelin SDK: the Ultimate Smart Contract Toolkit
- Create Eth App by PaulRBerg
- Rimble UI: open-source React component library for dApps
- Easy Peasy: Vegetarian friendly state for React
- The Graph: APIs for a vibrant decentralized future
- web3-react: A simple, maximally extensible, dependency minimized framework for building modern Ethereum dApps
- ethers.js: Complete Ethereum library and wallet implementation in JavaScript.