Development resources at your finger tips
Build with the coolest Web3 projects
Recurring funding for Open Source
Learn about Web3 & earn rewards
Show appreciation for each other
Meet fellow developers, designers, futurists and more. Collaborate and BUIDL awesome projects together.
Discover great web3 organizations, work on meaningful projects and build relationships with like minded people. Browse Tribes
Meet the top hunters and contributors from our community.
In partnership with Protocol Labs, we’re excited to welcome builders from everywhere to APOLLO, your mission control to engage with the builder…
We’re excited to publically announce that Matic Network is partnering with Gitcoin to launch the Build-n-Earn Program – assisting dApps t…
Gitcoin is GDPR complaint. Learn more in
Gitcoin's Terms & Conditions.
Check out the Issue Explorer
Looking to fund some work? You can submit a new Funded Issue here.
# Ocean Bounty: Smart Contract Event Monitoring Tool
## How can you help?
We want to build a Smart Contract Events Monitoring Tool that helps track and visualizes events triggered on our [keeper contracts](https://github.com/oceanprotocol/keeper-contracts). The tool must be capable of handling any type of Ethereum Smart Contract, but as a starting point, we encourage you to work with a contract in our Keeper Contracts repo. A good starting point could be our [DIDRegistry Smart Contract](https://github.com/oceanprotocol/keeper-contracts/blob/develop/contracts/didregistry/DIDRegistry.sol).
## How it works?
The purpose of the Ethereum Smart Contract Monitoring tool is to record and visualize events triggered by the smart contract. As seen in the below diagram, we have DID (Decentralized identifiers), SEA (Service Agreements) and Tokens (a store of value). Upon sending a request, the DID and SEA smart contracts, which have pre-defined events and methods, will send back a response. The idea is to set up [Eventeum](https://github.com/ConsenSys/eventeum) and configure the API with the list of addresses and events filters to listen to DIDRegistry Smart Contract responses. On the [nile testnet](https://docs.oceanprotocol.com/concepts/testnets/#nile-testnet), the Eventeum must be configured such that it picks up all info related to the event, and records it on the Elasticsearch database using Kafka Connect. The below diagram shows the high level overview of the task.
In order to build this tool, we will primarily need 3 components
**An Event Listener** - We will be using [Eventeum](https://github.com/ConsenSys/eventeum) to function as an event listener for the smart contract, after which it broadcasts the real-time event feed to Kafka. Kafka acts as an events broker to handle this feed and store the events in ElasticSearch DB.
**Storage** - ElasticSearch DB handles the storage of these events that is relayed to it via Kafka connect.
**Data Visualizer** - The final piece would Kibana, which visualizes the data stored in the database.
The final solution must record an event in the database everytime a new DID is registered. For all those recorded events, Kibana visualizes them in the form of basic charts.
## What needs to be done?
We want the final deliverable to be a Docker-Compose with multiple Docker images for each part of this application. The Docker Compose should consist of
- **1st Docker Image** - Eventeum that is configured to listen to DIDRegistry Smart Contract
- **2nd Docker Image** - Kafka w/ Kafka connect configured with Eventeum. Relays events the database.
- **3rd Docker Image** - Elasticsearch + Kibana for storage and visualization
- The **docker compose file** must deploy all 3 images seamlessly.
Each docker image needs to be a part of the setup included in the master docker compose file.
Everything should be easy to configure, and must allow subscription to multiple events, and move this information to Elastic Search.
## We are very happy when
- [ ] Docker-compose file with instructions (in a README) on how to set up.
- [ ] The docker-compose must contain the above mentioned 3 images.
- [ ] Final PR can be made to one of our repo - https://github.com/oceanprotocol/events-monitor
If you have any additional questions, please reach us on [Gitter](https://gitter.im/oceanprotocol/Lobby).
## Seen this problem before?
Any help solving this is welcome. Feel free to leave any comments and help someone else to solve it. We might airdrop tokens to someone even if not directly completing bounty.
## Questions & Reviews
Pull requests will be reviewed by one of the maintainers or long-term contributors. In case of any additional questions feel free to ask in this thread and we will do our best to add the missing info :)
## Things to know
The bounty lifecycle process including payout will be managed using [Gitcoin](https://gitcoin.co/explorer?network=mainnet&keywords=oceanprotocol&order_by=-web3_created).
We'll be responding to your questions here, but for discussion and clarification we recommend to join also our [Gitter channel](https://gitter.im/oceanprotocol/Lobby) where our tech community is accessible.
In order to see the PROCN balance in your wallet you'll need to reference the related token contract with address _0xf2aabdd898a0139195b2b5da7387d43a45ded254_. If you use a Metamask plugin you'll find the the exact steps [here](https://metamask.zendesk.com/hc/en-us/articles/360015489011-Managing-ERC20-Tokens).
Lastly, even if it is a contest bounty, we will reward all valuable contributions and efforts. We greatly appreciate the value our open source community brings to Ocean and will always award some tokens to all great contributions! :smiley:
Once the project was reviewed and merged in the master branch, you will receive the reward. PROCN is a proto-Ocean token. Bounty hunters that earn PROCN will be able to convert them 1:1 to Ocean tokens on network launch (Ocean Token will be valued at at 0.22 EUR on network launch). Network launch is expected to happen by Mar 31, 2019. Until then PROCN will be locked and non-transferrable in the ETH wallet to which it is delivered to.