This is quite a typical Single-Page Application (SPA) built on Node.js backend with a Vue.js-powered frontend.
In order to run 23gate you will need:
- An RPC provider for every network you are interested in. We strongly recommend running your own instance for high-traffic events monitoring.
- Recent node.js installed.
- MySQL up and running with a separate database created for the application.
- API keys for all Etherscan instances on networks that you want to run 23gate on. This is required for ABI fetching.
Note: MySQL is mandatory because we use the full-text index for certain features. It should not be very hard to port this code to other SQL databases, this just haven't been done yet.
In backend/:
- Copy
etherscans.example.jsontoetherscans.json. Edit the file and replaceREPLACE_MEwith your own API key for every network you would like to run on. - Copy
.env_exampleto.env. Edit the file and put MySQL connection string into it. npm --only=prod installto install required node packages.- Run
sync.mjsto create database.
In worker/:
- Copy
providers.example.mjstoproviders.mjs. Edit RPC providers list and their configuration. - Copy
.env_exampleto.env. Edit.env. Make sure thatLOG_DIRfolder exists. npm --only=prod installto install required node packages.
Web is already built in frontend-dist/. Should you need to rebuild, follow these steps in frontend/:
npm installnpm run build
In backend/ run node index.mjs. You should be able to open web, login and start creating your webhooks.
In worker/ run the following for every network you want to run on:
node downloader.mjs CHAIN_ID
node parser.mjs CHAIN_ID
Replace CHAIN_ID with the actual chain id. For example,
node downloader.mjs 0x89
node parser.mjs 0x89
Run the sender, a single instance for all chains:
node sender.mjs