🚀 GasGuardian is a Web3-powered solution designed to optimize gas fee usage for Ethereum-based transactions. This project focuses on automating transactions when gas fees are low and notifying users once transactions are completed, enabling developers and users to save costs on Ethereum networks.
- 🌐 Real-time Gas Tracking: Fetches current gas prices using Ethereum RPC providers.
- 🤖 Automated Transactions: Automatically executes transactions when gas fees meet predefined thresholds.
- 🔔 Notifications: Sends notifications to users (via Telegram, WhatsApp, or email) after successful transactions.
- 💾 Data Persistence: Stores gas fee logs and transaction data using AWS DynamoDB.
- 🔄 Cross-Network Support: Works seamlessly on Ethereum Mainnet, Sepolia, Goerli, and Holéksy Testnets.
- 🛠 Extensibility: Built with n8n, making it easy for anyone to extend and customize.
- Blockchain: Ethereum (Mainnet and Testnets)
- Automation: n8n (workflow automation)
- Frontend: Next.js
- Database: AWS DynamoDB for storing transaction and gas fee data
- Ethereum SDK: Ethers.js
- Gas Fee Monitoring:
- The system fetches gas prices at regular intervals using Ethereum RPC (e.g., Sepolia, Holéksy).
- Condition-Based Execution:
- Transactions are queued and executed when gas fees fall below a defined threshold.
- User Notification:
- Users are notified via messaging platforms like WhatsApp or Telegram after the transaction is executed.
- Data Storage:
- Logs gas prices and transaction details in AWS DynamoDB for historical tracking and debugging.
- Node.js (v18 or higher)
- MetaMask Wallet (or any Ethereum-compatible wallet)
- AWS Account (for DynamoDB setup)
- n8n (self-hosted or cloud-hosted instance)
-
Clone the Repository:
git clone https://github.com/your-username/gasguardian.git cd gasguardian
-
Install Dependencies:
npm install
-
Set Up Environment Variables: Create a
.env
file with the following:ETH_RPC_URL=https://rpc.sepolia.org PRIVATE_KEY=your_private_key_here AWS_ACCESS_KEY_ID=your_aws_access_key AWS_SECRET_ACCESS_KEY=your_aws_secret_key AWS_REGION=your_aws_region
-
Start n8n:
- Ensure your n8n instance runs and import the provided workflow file in the
/workflows
folder.
- Ensure your n8n instance runs and import the provided workflow file in the
-
Run the Backend:
node scripts/transaction.mjs
We welcome contributions to make GasGuardian even better! Here's how you can help:
- Fork the repository.
- Create a feature branch:
git checkout -b feature/your-feature-name
- Commit your changes and push to your fork:
git commit -m "Add your message here" git push origin feature/your-feature-name
- Open a Pull Request (PR) with a detailed explanation of your changes.
- Add support for additional messaging platforms (e.g., Slack, Discord).
- Improve error handling and logging for transaction failures.
- Create a web-based dashboard to visualize gas fee trends and logs.
- Integrate a local Ethereum node for better performance.
This project is licensed under the MIT License. See the LICENSE file for details.
- Ethereum Foundation for building the ecosystem.
- n8n for enabling no-code automation.
- Contributors who helped improve this project!
Feel free to reach out if you have questions or suggestions:
- Email: [email protected]
- Twitter: [@yourhandle](https://twitter.com/luizuk4