From b81c78adcf806ebba37d6ce8e6dc27d4b1d2e143 Mon Sep 17 00:00:00 2001 From: Gizmotronn Date: Tue, 29 Mar 2022 01:43:42 +0800 Subject: [PATCH] Set up queries for contract events with Moralis #1 --- docs/README.md | 62 +++++++++++++------------------------------------- 1 file changed, 16 insertions(+), 46 deletions(-) diff --git a/docs/README.md b/docs/README.md index b87cb00..3a9c79c 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,46 +1,16 @@ -# Getting Started with Create React App - -This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). - -## Available Scripts - -In the project directory, you can run: - -### `npm start` - -Runs the app in the development mode.\ -Open [http://localhost:3000](http://localhost:3000) to view it in the browser. - -The page will reload if you make edits.\ -You will also see any lint errors in the console. - -### `npm test` - -Launches the test runner in the interactive watch mode.\ -See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. - -### `npm run build` - -Builds the app for production to the `build` folder.\ -It correctly bundles React in production mode and optimizes the build for the best performance. - -The build is minified and the filenames include the hashes.\ -Your app is ready to be deployed! - -See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. - -### `npm run eject` - -**Note: this is a one-way operation. Once you `eject`, you can’t go back!** - -If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. - -Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. - -You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. - -## Learn More - -You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). - -To learn React, check out the [React documentation](https://reactjs.org/). +# Data transpiler & text generator +* Watch all ethereum (and later other chains) transactions from an account or smart contract address +* Sync with a DB like Infura, AWS, Firebase, Azure or Moralis +* Display output to a React/node.js app in the terminal or browser + +### Moralis setup for watching contract events +* Create a new server and copy the `Server URL` and the `Application ID` -> these need to be placed in the `.env` file +* Set up a "sync" action for "Sync & Watch Contract Events", and then select on which chain to focus on +* Set the "topic" to be the event/method of the contract that you want to track + * For example, a log for buying an NFT would consist of at least two transfer topics -> 1 sending currency from the buyer to the contract owner, and another sending the NFT from the contract to the buyer + * Then set the keys you want to monitor: + * E.g. `NFTTransfer(address,address,uint256)` +* Set the ABI to be equal to the ABI of the smart contract + * Search for the topic you want to track, and copy that object from the Contract ABI +* Finally, set the contract address +* Set the table name in the Moralis DB to whatever you'd like \ No newline at end of file