Ethereum API Configuration
Settings
Trademen provides ETH API for interacting with ETH node. To enable
ETH API you need to go to Application Control
> Application Settings
> Api Settings
> Ethereum
from sidebar nav.
Coin Settings
Select the Ethereum API from coin settings as bellow:
Ethereum Websocket Configuration
Ethereum node does not notify while a deposit/withdrawal occurs. So,we build a command that receives a new blockhead and process when a block mined into the blockchain. In order to run it continuously, it needs to run by a process manager. Here we use supervisord
for our process manager.
Supervisor Configuration
Supervisor configuration files are typically stored in the /etc/supervisor/conf.d
directory. Within this directory, you may create any number of configuration files that instruct supervisor how your processes should be monitored. For example, let's create a ethereum.conf
file that starts and monitors a ethereum
websocket process:
[program:ethereum]
process_name=%(program_name)s
command=php /var/www/html/project_directory/artisan ethereum:websocket
autostart=true
autorestart=true
user=root
redirect_stderr=true
Once the configuration file has been created, you may update the Supervisor configuration and start the processes using the following commands:
supervisorctl reread
supervisorctl update
supervisorctl start ethereum
You need to run the following command to check if your supervisor is running successfully.
supervisorctl status