-
git clone https://github.com/akshayacode/monitorContract
-
Navigate to the directory and
npm install
-
Start hardhat node -
npx hardhat node
-
Deploy deposit funds contract
-
Configure your environment variables in the below structure
HARDHAT_PRIVATE_KEY = "your local private key"
CONTRACT_ADDRESS = "contract address of deposit funds"
FINAL_PRIVATE_KEY= "your private key "
FROM_EMAIL="[email protected]"
TO_EMAIL ="[email protected]"
EMAIL_PASSWORD="your app password"
-
Run
python3 setupDB.py
to create Table which stores all the transaction informations -
Run
node monitor.js
to send mail whenever suspicious transaction occurs (In separate terminal) -
Run
node monitorMempool.js
to pause the contract on suspicious transaction(In separate terminal) -
Run
python3 updateDB.py
(In separate terminal) -
Now you can perform transactions in the deployed contract
Slither report is generated here https://github.com/akshayacode/monitorContract/blob/master/custom_slither_report.md