Danger
This installation is exclusive to those who installed it from me. Those who install it elsewhere may get errors.
Install Oracle
bash
cd $HOME
rm -rf slinky
git clone https://github.com/skip-mev/slinky.git
cd slinky
git checkout v1.2.0
make build
mv build/slinky /usr/local/bin/
cdCreate a service
bash
echo "export W_PORT="119"" >> $HOME/.bash_profile
source $HOME/.bash_profilebash
sudo tee /etc/systemd/system/slinkyd.service > /dev/null <<EOF
[Unit]
Description=Warden Slinky Oracle
After=network-online.target
[Service]
User=$USER
ExecStart=$(which slinky) --market-map-endpoint 127.0.0.1:${W_PORT}90 --port ${W_PORT}80 --metrics-prometheus-address 127.0.0.1:${W_PORT}02
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOFLet's start
bash
sudo systemctl daemon-reload
sudo systemctl enable slinkyd
sudo systemctl start slinkydLogs
bash
journalctl -fu slinkyd --no-hostnameWarden oracle settings
bash
nano /root/.warden/config/app.tomlDanger
At the bottom of app.toml, your oracle settings should be as shown below.
bash
###############################################################################
### Oracle ###
###############################################################################
[oracle]
## Enabled indicates whether the oracle is enabled.
enabled = "true"
## Oracle Address is the URL of the out of process oracle sidecar. This is used to
## connect to the oracle sidecar when the application boots up. Note that the address
## can be modified at any point, but will only take effect after the application is
## restarted. This can be the address of an oracle container running on the same
## machine or a remote machine.
oracle_address = "127.0.0.1:11980"
## Client Timeout is the time that the client is willing to wait for responses from
## the oracle before timing out.
client_timeout = "2s"
## MetricsEnabled determines whether oracle metrics are enabled. Specifically
## this enables instrumentation of the oracle client and the interaction between
## the oracle and the app.
metrics_enabled = "true"bash
sudo systemctl daemon-reload && sudo systemctl restart wardend && sudo systemctl restart slinkydbash
sudo journalctl -u wardend -f -o catCheck
bash
curl localhost:${W_PORT}80/slinky/oracle/v1/prices | jq