直接邀請機器人開始使用 | Invite Bots below to try it out!
LINE Official Account Invite Link
Discord Bot Under Developing...
📖 繁體中文版README.md 📖
This bot is designed to notify you when there is a new transaction on the tracked wallet addresses happened. It supports both Ethereum mainnet and Goerli testnet in case you are a developer. Notifications can be sent by Line Notify or Discord bot.
Project progress:
TODO LIST | Support |
---|---|
Line-Notify support | ☑️ |
Discord bot support | 🛠️ |
Normal txns | ☑️ |
Internal txns | ☑️ |
ERC20 token txns | ☑️ |
ERC721 token txns | ☑️ |
ERC1155 token txns | ❌️ |
☑️ Supported | 🛠️ In progress | ❌️ Not supported yet
- Download the latest release from here
- Unzip the file then open up
config.yml
, Notepad++ editor is recommended - Fill in the following required information, see here for more details
- Now run
WalletTracker.exe
to start the bot - Make sure you've added your Line Bot / Line Notify as a friend
- Enjoy!
# ++--------------------------------++
# | Ethereum Wallet Tracker ver. |
# | Made by LD & K |
# ++--------------------------------++
# Paste your endpoint for the webhook here.
# You can use ngrok to get a free static endpoint now!
# Find out more here: https://ngrok.com/
# Notes: Make sure the webhook url is started with https:// and ended without a slash (/)
webhook_url: ''
# Port for the webhook to listen on. Default is 5000.
# If you change this, make sure to change the port in your reverse proxy as well.
webhook_port: 5000
# Paste your Etherscan api key and Alchemy api key / webhook auth token here.
# Etherscan: https://etherscan.io/myapikey
# Alchemy api key: https://dashboard.alchemy.com/apps
# Alchemy webhook: https://dashboard.alchemyapi.io/webhooks
etherscan_api_key: ''
alchemy_api_key: ''
alchemy_webhook_auth_token: ''
# Paste yor Line Bot and Line Notify tokens and secrets here.
# Line bot: https://developers.line.biz/console/
# Line Notify: https://notify-bot.line.me/my/services/
line_channel_access_token: ''
line_channel_secret: ''
line_notify_id: ''
line_notify_secret: ''
Basically, a webhook URL is an endpoint that other services can send us messages. In this case, we will use it to
receive messages from Line and Discord, so the value of webhook_url
should be the URL(with HTTPS) of your server.
You can find out an easy way by using ngrok, and here is
a tutorial for it.
- Go to Etherscan and sign up for an account
- Login to your account and click
+ Add
in the top right corner - Enter the App Name as
ETH Wallet Tracker
and clickCreate New API Key
- Done! You can now copy your API key
- Go to Alchemy and sign up for an account
- Login to your account and click
Auth token
in the top right corner - Done! You can now copy your auth token
- Go to Line Developers and login with your Line account
- If you don't have a Business ID, simply create one by following the instructions
- Then click
Create a new provider
- Fill in the required information and click
Create
- Click
Create a new channel
and selectMessaging API
- Fill in the required information and click
Create
- You can now find your channel secret in Basic settings and channel access token in Message API, click
Issue
to copy it
Notes: Please make sure you've checked Allow bot to join group chats
option and un-checked
Auto-reply messages
in your Line bot settings, which can be found in Messaging API
> LINE Official Account features
section.
- Go to Line Developers and login with your Line account
- Select your channel application
- Select Messaging API, find
Webhook URL
and click edit - Fill in your webhook URL and add
/callback
at the end - Click
Save
and it's pretty done! - Remember to check
Use webhook
under theWebhook URL
section
Notes: Line webhook only works with HTTPS, so you need to use a reverse proxy to make it work. If you don't know how to create a reverse proxy, you can use ngrok to create one easily, find out how to use it here.
- Go to Line Notify and login with your Line account
- Click
Add service
- Fill in the service name with
ETH Wallet Tracker
- Fill in the Callback URL with your webhook URL and add
/notify
at the end - Fill in other required information then click
Agree and continue
- You can now find your client ID and secret at the top of the page
- Go to Ngrok sign up for an account and login
- Click
+ New Domain
at the Domains Dashboard, copy the domain name you created, which should be something likesometihng-random-idontknow.ngrok-free.app
- Download the latest version of ngrok from here
- Extract the zip file you downloaded and run
ngrok.exe
- Run
ngrok config edit
, it'll open up a text editor - Replace the whole file with the following content
authtoken: <your_auth_token> version: 2 tunnels: app: proto: http hostname: <domain_name> addr: 127.0.0.1:5000
- Replace
<domain_name>
with the domain name you created at step 3 - Replace
<your_auth_token>
with your auth token, which can be found at here
- Replace
- Now save the config file then run
ngrok start app
at the command line - Copy the URL from
Fowarding
, it should be the same as the domain name you created at step 3 - Done! Now you can use this URL as your webhook URL
- Fork this repository
- Clone your forked repository
- Create a new branch
- Make your changes
- Commit and push your changes
- Create a pull request
- Wait for review
- PyYAML for reading config file
- requests for sending HTTP requests
- line-bot-sdk for Line bot usage
- fastapi for the webhook server
- uvicorn for running the webhook server
- python-multipart for parsing multipart/form-data
- 100 characters per line
- Use
snake_case
for variables and functions - Add a blank line at the end of the file
- Optimize imports, remove the redundant ones
- Google style TODO comments
- Use Sphinx Docstring style for docstrings
- Use these headers for commits
- Update - your commit messages here
- Fix bug - your commit messages here
- Optimize - your commit messages here
- Standardize - your commit messages here
If you have any suggestions or found any bugs, please open an issue here, will try to fix it as soon as possible.
If you find this project useful, consider starring this repository to show your support! or donating any cryptocurrencies to the following addresses
Ethereum address: hot.happygroup.eth
This project is licensed under the MIT License - see the LICENSE file for details
此專案的機器人可以讓你追蹤一個以太坊錢包的交易活動,並在有新的交易發生時,透過Line Notify或Discord bot來通知您! 同時支援開法者使用 Goerli 測試網路。
專案進度:
完成列表 | 進度 |
---|---|
支援 Line-Notify 通知 | ☑️ |
支援 Discord 機器人通知 | 🛠️ |
一般的交易活動 | ☑️ |
內部交易活動 | ☑️ |
ERC20 代幣活動 | ☑️ |
ERC721 代幣活動 | ☑️ |
ERC1155 代幣活動 | ❌️ |
☑️ 已支援 | 🛠️ 開發中... | ❌️ 尚未開發
- 從 這裡 下載最新的版本
- 解壓縮檔案後,於資料夾內開啟
config.yml
, 建議使用Notepad++來編輯檔案 - 遵照內文完成填寫
config.yml
,請參考 這裡 - 運行
WalletTracker.exe
- 確認你已經將你的 Line Bot / Line Notify 加為好友
- 盡情使用!
# ++--------------------------------++
# | Ethereum Wallet Tracker ver. |
# | Made by LD & K |
# ++--------------------------------++
# Paste your endpoint for the webhook here.
# You can use ngrok to get a free static endpoint now!
# Find out more here: https://ngrok.com/
# Notes: Make sure the webhook url is started with https:// and ended without a slash (/)
webhook_url: ''
# Port for the webhook to listen on. Default is 5000.
# If you change this, make sure to change the port in your reverse proxy as well.
webhook_port: 5000
# Paste your Etherscan api key and Alchemy api key / webhook auth token here.
# Etherscan: https://etherscan.io/myapikey
# Alchemy api key: https://dashboard.alchemy.com/apps
# Alchemy webhook: https://dashboard.alchemyapi.io/webhooks
etherscan_api_key: ''
alchemy_api_key: ''
alchemy_webhook_auth_token: ''
# Paste yor Line Bot and Line Notify tokens and secrets here.
# Line bot: https://developers.line.biz/console/
# Line Notify: https://notify-bot.line.me/my/services/
line_channel_access_token: ''
line_channel_secret: ''
line_notify_id: ''
line_notify_secret: ''
簡單來說,Webhook URL 是其他服務可以用來將訊息發送給我們的端點網址。而我們將使用它來接收來自 Line 和 Discord
的訊息,所以 webhook_url
的值應該是你伺服器的對外URL網址(需為HTTPS協議)。你可以使用 ngrok
來簡單的達成此目標,請參考 這裡的教學
- 前往 Etherscan 註冊一個帳號並登入
- 進入上述網址並點擊位於右上角的
+ Add
- 在 App Name 欄位輸入
ETH Wallet Tracker
並點擊Create New API Key
- 完成! 你現在可以在頁面上複製你的 API key 囉
- 前往 Alchemy 註冊一個帳號並登入
- 進入上述網址並點擊位於右上角的
Auth token
- 完成! 你現在可以在頁面上複製你的 auth token 囉
- 前往 Line Developers 並使用你的Line帳號登入
- 如果你沒有 Business ID,請按照官網的指示建立一個
- 點擊
Create a new provider
- 填寫完需要的資料後點擊
Create
- 點擊
Create a new channel
並選擇Messaging API
的分類 - 填寫完需要的資料後點擊
Create
- 現在你可以在 Basic settings 找到你的
channel secret
以及在 Message API 找到channel access token
,點擊Issue
來複製
註:請確保你在 Line 機器人設定中的 Messaging API
> LINE Official Account features
, 勾選
Allow bot to join group chats
選項,並 取消勾選 Auto-reply messages
選項
- 前往 Line Developers 並使用你的Line帳號登入
- 點擊你要使用的
channel application
- 選擇 Messaging API 分類, 找到
Webhook URL
並點擊edit
- 貼上你的 Webhook URL 並在尾處加上
/callback
- 點擊
Save
- 在
Webhook URL
底下勾選Use webhook
註:Line Webhook 僅適用於 HTTPS
協議,恕不接受任何未經認證過的網址
如果你不知道如何申請,可以使用 ngrok
創建一個簡單的導向服務,請參考 這裡的教學
- 前往 Line Notify,並使用您的 Line 帳號登入
- 點擊
Add service
- 在 Service Name 欄位輸入
ETH Wallet Tracker
- 在 Callback URL 欄位輸入您的 Webhook URL,並在尾處加上
/notify
- 填寫其他必要資訊,然後點擊
Agree and continue
- 您現在可以在頁面頂部找到您的客戶端 ID 和密鑰
- 前往 Discord Developer Portal 並使用你的Discord帳號登入
- 點擊
New Application
- 幫此機器人取名為
Line訊息
後點擊Create
- 點擊左側列表的
Bot
- 點擊
Add Bot
- 在
Privileged Gateway Intents
底下將Presence Intent
,Server Members Intent
及Message Content Intent
都打勾 - 現在你可以在
Build-A-Bot
底下找到你的 bot token,點擊Reset Token
來複製
- 前往 Ngrok 註冊一個帳號並登入
- 在 Domains Dashboard 中點擊
+ New Domain
,複製您所建立的網域名稱,成功的話應該會長這樣something-random-idontknow.ngrok-free.app
- 從 這裡 下載最新版本的 ngrok 程式
- 解壓縮你下載的 zip 檔案,然後執行
ngrok.exe
- 執行
ngrok config edit
,它會打開一個文字編輯器 - 複製以下並完全替代原本的內容
authtoken: <your_auth_token> version: 2 tunnels: app: proto: http hostname: <domain_name> addr: 127.0.0.1:5000
- 把
<domain_name>
替換為您在步驟3所建立的網域名稱 - 把
<your_auth_token>
替換為您的授權金鑰,您可以在 這裡 找到
- 把
- 現在儲存檔案並關閉,繼續在命令行中執行
ngrok start app
- 複製
Fowarding
所生成的URL,它應該與您在步驟3中創建的網域名稱相同 - 完成!現在你可以將此 URL 作為你的 Webhook URL
- Fork 這個專案
- 複製你剛剛 Fork 的專案至本地
- 建立新的分支
- 盡情發揮你的能力
- Commit / Push 你的程式碼
- 建立新的 Pull Request
- 等待回覆
- PyYAML 用來讀取 yaml 格式的設定檔
- requests 用來發送 HTTP 請求
- line-bot-sdk 用來操作並設定 Line Bot
- fastapi 用來建立 webhook server
- uvicorn 用來運行 webhook server
- python-multipart 用來解析 multipart/form-data
- 每行不超過100個字元
- 使用
snake_case
命名變數及函式 - 在檔案尾處加上一個空行
- 最佳化程式碼並移除不必要的import
- Google style TODO註解
- 使用 Sphinx Docstring 進行函式註解
- 提交請求時請使用以下格式,並全英文撰寫
- Update - your commit messages here
- Fix bug - your commit messages here
- Optimize - your commit messages here
- Standardize - your commit messages here
如果你有任何建議或是發現了任何問題,請在 Issues 提交你的意見,我會盡快回覆你!
如果你覺得這個專案對你有幫助,歡迎按下右上角的 Star 來追蹤此專案! 也可以透過加密貨幣捐款來支持我做出更多開源內容
以太坊錢包地址: hot.happygroup.eth
此專案的版權規範採用 MIT License - 至 LICENSE 查看更多相關聲明