Start a search engine (Docker)
Start a smart contract search engine for your own DApp
Last updated
Was this helpful?
Start a smart contract search engine for your own DApp
Last updated
Was this helpful?
This documentation details how you can start, and host, your own using . If you would like to build from scratch from a fresh Ubuntu install, please refer to .
We start from a fresh install of Ubuntu 18.04. You should first follow .
Next install the Python pip and AWS CLI utilities as follows. The AWS CLI is required to access AWS ElasticSearch services.
We use the AWS ElasticSearch services to run the search engine. You should . For now, a single machine development cluster would suffice. In the Access Policy section, please select IAM users. You will need to access AWS ES services. Here is an example.
Once the ElasticSearch service is up and running, you should have an ES endpoint like the following.
Now, go back to the Ubuntu 18.04 machine.
Configure AWS CLI to access the ElasticSearch engine.
After configuration, AWS config and credentials are placed in ~/.aws/
.
Next, get the source code for the search engine.
Fill in the following configuration options.
ServerName
in apache config config/site.conf
. This could be your public IP address for now.
blockchain
, elasticsearch
, and the initial ABI configs in python/config.ini
.
publicIp
in js/secondStateJS.js
. This could be your IP address for now.
Now you can visit http://<your_host>
to check your smart contract search engine. Be patient, as it may take hours before the results show up on that page.
Your search engine is started with a single ABI to index from the config.ini
file. You can add more ABIs to the index by executing the following script from inside the Docker instance.
You can find the container_id
for your docker instance on your host OS, by running
Next, logging into your docker container using the container_id
Once logged, in the /app
directory, create a file upload_abi.py
like the following.
Then run
Also once all of this is done, please just exit docker and give it a reboot.
It requires four pieces of information. The access keys are found in the for the user you configured to access the ElasticSearch engine you just created.
Check for details about configurations.