-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathForta Installation
More file actions
66 lines (49 loc) · 1.82 KB
/
Copy pathForta Installation
File metadata and controls
66 lines (49 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//////////////////////////// Install forta
$ sudo curl https://dist.forta.network/pgp.public -o /usr/share/keyrings/forta-keyring.asc -s
$ echo 'deb [signed-by=/usr/share/keyrings/forta-keyring.asc] https://dist.forta.network/repositories/apt stable main' | sudo tee -a /etc/apt/sources.list.d/forta.list
$ sudo apt-get update
$ sudo apt-get install forta
forta init --passphrase $password
Successfully initialized at /root/.forta
- Please make sure that all of the values in config.yml are set correctly.
- Please fund your scanner address with some MATIC.
- Please enable it for the chain ID in your config by doing 'forta register --owner-address <your_owner_wallet_address>'.
=================== Make system service
sudo tee /etc/systemd/system/forta.service > /dev/null <<EOF
[Unit]
Description=Forta Node
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/root/
ExecStart=$(which forta) run --passphrase=$password
Restart=on-failure
RestartSec=3
LimitNOFILE=10000
[Install]
WantedBy=multi-user.target
EOF
======= Add into environment
nano /etc/systemd/system/forta.service.d/env.conf
[Service]
Environment="FORTA_DIR=/root/.forta"
Environment="FORTA_PASSPHRASE=$password"
sudo systemctl daemon-reload
sudo systemctl enable forta
sudo systemctl daemon-reload
sudo systemctl start forta
========== Configure in Alchemy (or any layer 1)
https://dashboard.alchemyapi.io/apps
add information to config.yaml
sed -i '3,3 s/\(chainId: \).*/\1137/g' config.yml
API_KEY=https://your_node_in_Alchemy
sed -i '8,8 s|\(.url: \).*|\1'$API_KEY'|g' config.yml
sed -i '12 s/jsonRpc:/enabled: false/g' config.yml
sed -i '13d' config.yml
========= Start
forta register --passphrase $password --owner-address meta_wallet_address
sudo systemctl start forta
============ check log and status
journalctl -u forta.service -f -o cat
forta status