A simple and lightweight Ethereum transaction checker written in JavaScript. This tool monitors the Ethereum blockchain for transactions to a specified account, and reports them to a Discord channel using webhooks.
- Monitors the latest block on the Ethereum blockchain for transactions.
- Sends a message to a Discord channel when a new block is checked.
- Reports found transactions to the specified account to a Discord channel.
- web3.js - Ethereum JavaScript API
- discord.js - A powerful library for interacting with the Discord API
- Ensure you have Node.js installed.
- Clone the repository:
git clone https://github.com/your-username/ethereum-transaction-checker.git cd ethereum-transaction-checker
- Install the necessary npm packages:
npm install web3 discord.js
- Create a
.env
file in the root directory of the project and add the following, replacing'your-infura-id'
and'your-discord-webhook-id'
'your-discord-webhook-token'
with your own credentials:INFURA_ID=your-infura-id DISCORD_WEBHOOK_ID=your-discord-webhook-id DISCORD_WEBHOOK_TOKEN=your-discord-webhook-token
- Run the program:
node index.js
This script is set up to check the latest block every 15 seconds and report any transactions to the specified account to a Discord channel.
let txChecker = new TransactionChecker(process.env.INFURA_ID, 'Address');
setInterval(() => {
txChecker.checkBlock();
}, 15 * 1000);