Skip to content
🎏 Publisher events handler agent dealing with Keeper Contracts events
Python Shell Makefile Dockerfile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Bump version: 0.1.1 β†’ 0.1.2 Sep 11, 2019
scripts Fix test and copy artifacts before starting test. Aug 26, 2019
tests Fix setup of provider account. Aug 30, 2019
.travis.yml Rename repo to events-handler Sep 12, 2019
Dockerfile Rename the parity account env var names to reflect how they're used. Aug 29, 2019
Makefile (WIP) events handler for provider of ocean agreement services. Jul 5, 2019 Update README Oct 11, 2019 First commit Jul 3, 2019
config.ini.template Fix typo. Aug 30, 2019
logging.yaml Update logging and support setting default log level via env var. Aug 28, 2019
requirements_dev.txt (WIP) events handler for provider of ocean agreement services. Jul 5, 2019
setup.cfg First commit Jul 3, 2019 Add working test. Aug 25, 2019



Publisher events handler agent dealing with Keeper Contract events


Monitors ServiceExecutionAgreement events and act as a provider agent to grant access and release reward for the publisher/provider. This is a critical part in the process of consuming data sets in the Ocean Protocol network. Every provider in the network must run some sort of an events-handler to be able to fulfill the access condition of an Access service in an SEA .

This release only supports the Access service type that is defined in an Ocean DDO. More service types will be supported in the events-handler when they're added to the Ocean services.


Python 3.6

Running Locally

First, clone this repository:

git clone
cd events-handler/

Start a keeper node and other services of the ocean network:

git clone
cd barge
bash --no-events-handler --no-commons --local-spree-node

Barge is the repository where all the Ocean Docker Compose files are located. We are running the script the easy way to have Ocean projects up and running. We run without an events-handler instance because we will run it directly.

To learn more about Barge, visit the Barge repository.

Note that it runs an Aquarius instance and an Elasticsearch instance but Aquarius can also work with BigchainDB or MongoDB.

Export environment variables PROVIDER_ADDRESS, PROVIDER_PASSWORD and PROVIDER_KEYFILE. Use the values from the tox.ini file, or use your own.

The most simple way to start is:

pip install -r requirements_dev.txt
export CONFIG_FILE=config.ini

Once the events-handler is running, you can use the Ocean API (Squid library available in python, node, and java implementation) to publish an asset and start a consume request. For more details on using the
Ocean ecosystem please refer to Ocean API

To run the events-handler as a provider, you can either run it from source as described above or use a docker image docker pull oceanprotocol/events-handler:latest. To run the docker image please refer to the docker-compose file in barge events_handler.yml

Code style

The information about code style in python is documented in this two links python-developer-guide and python-style-guide.


Automatic tests are setup via Travis, executing tox. Our test use pytest framework.


Copyright 2018 Ocean Protocol Foundation Ltd.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.
You can’t perform that action at this time.