|
1 |
| -# wallet-watch-bot |
| 1 | +## Wallet Watch Discord Bot |
| 2 | + |
| 3 | +[![TypeScript version][ts-badge]][typescript-5-1] |
| 4 | +[![Node.js version][nodejs-badge]][nodejs] |
| 5 | +[![APLv2][license-badge]][license] |
| 6 | +[![Build Status - GitHub Actions][gha-badge]][gha-ci] |
| 7 | + |
| 8 | +This tool enables you to monitor Ethereum wallets, check their ETH balances, and compile a list of the NFTs owned by each wallet. The bot is crafted for effortless setup and deployment within your preferred environment. |
| 9 | + |
| 10 | +🏃🏽 Instant Value: All basic tools included and configured: |
| 11 | + |
| 12 | +- [TypeScript][typescript] [5.1][typescript-5-1] |
| 13 | +- [ESM][esm] |
| 14 | +- [ESLint][eslint] with some initial rules recommendation |
| 15 | +- [Jest][jest] for fast unit testing and code coverage |
| 16 | +- Type definitions for Node.js and Jest |
| 17 | +- [Prettier][prettier] to enforce consistent code style |
| 18 | +- NPM [scripts](#available-scripts) for common operations |
| 19 | +- [EditorConfig][editorconfig] for consistent coding style |
| 20 | +- Reproducible environments thanks to [Volta][volta] |
| 21 | +- Example configuration for [GitHub Actions][gh-actions] |
| 22 | +- Simple example of TypeScript code and unit test |
| 23 | + |
| 24 | +### Prerequisites |
| 25 | + |
| 26 | +- Node.js 18.x or higher |
| 27 | +- A Discord bot token |
| 28 | +- An Alchemy API key |
| 29 | + |
| 30 | +### Installation |
| 31 | + |
| 32 | +1. Clone the [repository](https://github.com/bullishgopher/wallet-watch-bot) or download the source code. |
| 33 | + |
| 34 | +2. Install dependencies: |
| 35 | + |
| 36 | +```bash |
| 37 | +pnpm install |
| 38 | +``` |
| 39 | + |
| 40 | +### Configuration |
| 41 | + |
| 42 | +Create `.env` in the project directory and add your Discord bot token and Alchemy API key. |
| 43 | + |
| 44 | +``` |
| 45 | +DISCORD_BOT_TOKEN= |
| 46 | +DISCORD_CHANNEL_ID= |
| 47 | +ALCHEMY_API_KEY= |
| 48 | +``` |
| 49 | + |
| 50 | +### Running the Bot |
| 51 | + |
| 52 | +Start the bot: |
| 53 | + |
| 54 | +```bash |
| 55 | +node index.js |
| 56 | +``` |
| 57 | + |
| 58 | +The bot should now be running and connected to your Discord server. You should see a message in the configured channel indicating that the Wallet Watch Bot is online. |
| 59 | + |
| 60 | +## Available Scripts |
| 61 | + |
| 62 | +- `clean` - remove coverage data, Jest cache and transpiled files, |
| 63 | +- `prebuild` - lint source files and tests before building, |
| 64 | +- `build` - transpile TypeScript to ES6, |
| 65 | +- `build:watch` - interactive watch mode to automatically transpile source files, |
| 66 | +- `lint` - lint source files and tests, |
| 67 | +- `prettier` - reformat files, |
| 68 | +- `test` - run tests, |
| 69 | +- `test:watch` - interactive watch mode to automatically re-run tests |
| 70 | + |
| 71 | +### Usage |
| 72 | + |
| 73 | +The bot has the following commands: |
| 74 | + |
| 75 | +``` |
| 76 | +!track <address>: Track an Ethereum address for incoming and outgoing transactions. |
| 77 | +
|
| 78 | +!balance <address>: Check the Ether balance of an Ethereum address. |
| 79 | +
|
| 80 | +!nfts <address>: List NFTs owned by an Ethereum address. |
| 81 | +
|
| 82 | +!help: Show a help message with the available commands. |
| 83 | +``` |
| 84 | + |
| 85 | +## Additional Information |
| 86 | + |
| 87 | +### Why include Volta |
| 88 | + |
| 89 | +[Volta][volta]’s toolchain always keeps track of where you are, it makes sure the tools you use always respect the settings of the project you’re working on. This means you don’t have to worry about changing the state of your installed software when switching between projects. For example, it's [used by engineers at LinkedIn][volta-tomdale] to standardize tools and have reproducible development environments. |
| 90 | + |
| 91 | +I recommend to [install][volta-getting-started] Volta and use it to manage your project's toolchain. |
| 92 | + |
| 93 | +### ES Modules |
| 94 | + |
| 95 | +This template uses native [ESM][esm]. Make sure to read [this][nodejs-esm], and [this][ts47-esm] first. |
| 96 | + |
| 97 | +If your project requires CommonJS, you will have to [convert to ESM][sindresorhus-esm]. |
| 98 | + |
| 99 | +Please do not open issues for questions regarding CommonJS or ESM on this repo. |
| 100 | + |
| 101 | +### Contributing |
| 102 | + |
| 103 | +Feel free to open issues or submit pull requests if you find any bugs or have suggestions for improvements. |
| 104 | + |
| 105 | +## License |
| 106 | + |
| 107 | +Licensed under the APLv2. See the [LICENSE](https://github.com/bullishgopher/wallet-watch-bot/blob/main/LICENSE) file for details. |
| 108 | + |
| 109 | +[ts-badge]: https://img.shields.io/badge/TypeScript-5.1-blue.svg |
| 110 | +[nodejs-badge]: https://img.shields.io/badge/Node.js->=%2018.12-blue.svg |
| 111 | +[nodejs]: https://nodejs.org/dist/latest-v18.x/docs/api/ |
| 112 | +[gha-badge]: https://github.com/jsynowiec/node-typescript-boilerplate/actions/workflows/nodejs.yml/badge.svg |
| 113 | +[gha-ci]: https://github.com/jsynowiec/node-typescript-boilerplate/actions/workflows/nodejs.yml |
| 114 | +[typescript]: https://www.typescriptlang.org/ |
| 115 | +[typescript-5-1]: https://devblogs.microsoft.com/typescript/announcing-typescript-5-1/ |
| 116 | +[license-badge]: https://img.shields.io/badge/license-APLv2-blue.svg |
| 117 | +[license]: https://github.com/jsynowiec/node-typescript-boilerplate/blob/main/LICENSE |
| 118 | +[sponsor-badge]: https://img.shields.io/badge/♥-Sponsor-fc0fb5.svg |
| 119 | +[sponsor]: https://github.com/sponsors/jsynowiec |
| 120 | +[jest]: https://facebook.github.io/jest/ |
| 121 | +[eslint]: https://github.com/eslint/eslint |
| 122 | +[wiki-js-tests]: https://github.com/jsynowiec/node-typescript-boilerplate/wiki/Unit-tests-in-plain-JavaScript |
| 123 | +[prettier]: https://prettier.io |
| 124 | +[volta]: https://volta.sh |
| 125 | +[volta-getting-started]: https://docs.volta.sh/guide/getting-started |
| 126 | +[volta-tomdale]: https://twitter.com/tomdale/status/1162017336699838467?s=20 |
| 127 | +[gh-actions]: https://github.com/features/actions |
| 128 | +[repo-template-action]: https://github.com/jsynowiec/node-typescript-boilerplate/generate |
| 129 | +[esm]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules |
| 130 | +[sindresorhus-esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c |
| 131 | +[nodejs-esm]: https://nodejs.org/docs/latest-v16.x/api/esm.html |
| 132 | +[ts47-esm]: https://devblogs.microsoft.com/typescript/announcing-typescript-5-1/#esm-nodejs |
| 133 | +[editorconfig]: https://editorconfig.org |
0 commit comments