Guys can anyone tell me how to authenticate user based on his wallet private key in a dapp?
I have made the frontend using react js and also developed the smart contract.
Now i want to integrate my dapp with metamask . whenever i want to invoke method of smart contract from frontend it would show pop up to sign transaction.

May 11, 2020, 2:24 PM
Metamask is injected provider. When you invoke a method of smart contract , the metamask transaction confirmation appears.
If you want to authorize users on blockchain, you may create access control list for your contract. Never ever proliferate the private keys
Metamask wallet authorize users already
If you want not to show the the interface of your dApp, you may load the components in respect to default account
May 11, 2020, 3:02 PM
Okay how do i integrate metamask with my react js app
May 11, 2020, 3:02 PM
Use web3 capabilities for that
May 11, 2020, 3:03 PM
I am rendering all the components into the main component js file(App.js).
In app.js i have set the routes for different components.
May 11, 2020, 3:03 PM
I recommend you to check the drizzle - a part of truffle suite
There is a tutorial how to load blockchain data add contracts and interact with them
May 11, 2020, 3:05 PM
Can you share it here?
May 11, 2020, 3:05 PM
www.trufflesuite.com
https://www.trufflesuite.com/
May 11, 2020, 3:06 PM

© 2024 Draquery.com All rights reserved.