Forta is the first real-time network for threat detection and operational monitoring of blockchain activity. Forta enables protocols, DAOs, investors, and other users to receive alerts about security, financial, operational, and governance events at different levels of the blockchain. The network consists of detection bots and nodes that check transactions for anomalies and generate alerts that are stored on IPFS and linked to the public blockchain. Forta aims to become a public utility for securing economic transactions in decentralized systems by engaging developers and teams to build bots and use the network to detect threats and anomalies.
PASSPHRASE=qwerty && \
OWNER_ADDRESS=0x111
# ONE COMMAND
echo "export PASSPHRASE=$PASSPHRASE" >> $HOME/.bash_profile && \
echo "export OWNER_ADDRESS=$OWNER_ADDRESS" >> $HOME/.bash_profile && \
source $HOME/.bash_profile
# Update if needed and install packages
sudo apt update && sudo apt upgrade -y && \
sudo apt install ca-certificates curl gnupg lsb-release -y
#Install Docker
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update && sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
#Docker config
nano /etc/docker/daemon.json
#Write to file
{
"default-address-pools": [
{
"base":"172.17.0.0/12",
"size":16
},
{
"base":"192.168.0.0/16",
"size":20
},
{
"base":"10.99.0.0/16",
"size":24
}
]
}
systemctl restart docker
#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 $PASSPHRASE
#After init send 0.01 MATIC to the new address
#Backup new address. Copy/paste json to the safe place
cat /root/.forta/.keys/UTC--*
#Update service file
nano /lib/systemd/system/forta.service
#Add after [Service]
Environment="FORTA_DIR=/root/.forta"
Environment="FORTA_PASSPHRASE=YOUR_PASSPHRASE"
#Public RPC keys
nano .forta/config.yml
#Scanner register
forta register --owner-address $OWNER_ADDRESS --passphrase $PASSPHRASE
sudo systemctl daemon-reload && sudo systemctl enable forta && sudo systemctl start forta
#Go to https://polygonscan.com/address/0x9ff62d1FC52A907B6DCbA8077c2DDCA6E6a9d3e1#writeProxyContract
#Connect your owner metamask
#spender: 0xd2863157539b1D11F39ce23fC4834B62082F6874
#amount: 500000000000000000000
#send and approve tx
#Go to https://polygonscan.com/address/0xd2863157539b1D11F39ce23fC4834B62082F6874#writeProxyContract
#Connect your owner metamask
#subjectType: 0
#subject: Your scan node address (from forta init)
#stakeValue: 500000000000000000000
#send and approve tx
#in a few minutes can check if all is good
forta status