Submission for ETHGlobal Waterloo 2023 Hackathon. This poject is a web3 middleware application aimed to provide security to user transaction occurred on the blockchain. Using Tenderly to simulate and test a virtual transaction our product aims to guarantee 100% safe User transaction.
We act as a middleman, every communication that occurs between a user and the blockchain through a wallet (MetaMask) occurs through our platform. We insure each transaction is scam free by using a stable and versatile platform called Tenderly. Tenderly provides a simulation that runs the transaction on a virtual fork of the blockchain allowing the users to remove the barrier between a transaction and its execution.
Firstly some of our tech stacks include node.js
, react
, and web3
frameworks. We made a custom rpc server in node.js
that is able to directly connect to MetaMask
which for the sake of the hackathon connects to the Sepolia
test net for development and testing purposes. Using the latest frameworks we received the data from MetaMask
requests and send it directly to tenderly in the right format which simulates it in a forked blockchain. Next tenderly
returns the results which we store in a database(SQLite
) and it is inflected in a user interface on our website allowing the user to clearly analyze the impact of their transaction. Lastly, the User can click on the submit transaction button if they feel safe to commit the transaction given the result of the simulation.
- Have
Metamask
Account - Make
Infura
account (will provide0.5 ETH
for mock usage on forked blockchain)
- First clone the project
git clone https://github.com/allan7yin/middleManDapp.git
- Navigate to backend folder and install dependneices
npm install
- Configure environment variables in
.env
. To do so, will need to create account with Tenderely. Within Tenderely, create a project, create virtual fork of blockchain on testing networkSepolia
. For that project, obtainapi key
, and place into.env
. - Once configured, run application (default is port
3000
)
npm start
- Navigate to frontend folder and install dependencies
npm install
- Run the fronend (default is port 3001)
npm run start
Open MetaMask
in your browser extension, and add the network as the backend server. By default the parameters are:
Network Name:
(your choice)New RPC URL: http://localhost:3000
Chain ID: 11155111
(sinceSepolia
test network is used)Currency Symbol: ETH