0

I'm using web3 1.0 to programmatically deploy smartcontracts and make transactions, and metamask to sign those transactions, since i don't want to have hardcoded fragile things.

I would like metamask to stop asking the permissions and do it automatically instead, is this possible?

  • I do not think you can sign using metamask private key without a popup. If you want to sign something without a popup you need to manage the keys on your own. – Ismael Jun 14 '18 at 1:04
0

You might want to look into EthersJs instead of web3. It's way better for what you're trying to achieve.

One major difference between ethers.js and web3 is how they handle key management and interaction with the ethereum blockchain. Web3 assumes that there is a local node connected to the application. That node is assumed to store keys, sign transactions, and interact with and read the ethereum blockchain. In reality, this is not often the case — most users are not running geth locally. Metamask effectively emulates that environment through a browser application, and so most web3 apps require Metamask to hold keys, sign transactions, and interact with the ethereum mainnet.

Ethers.js takes a different approach that we believe gives developers more flexibility. Ethers.js separates the “node” into two separate roles:

A “wallet” that holds keys and signs transaction, and A “provider” that serves as an anonymous connection to the ethereum network, checking state and sending transactions

This allows developers to manage these two roles discretely — perhaps using Infura as the provider, and a hardware device for the wallet.

0

Yes, you can. I am able to use web3 without metamask to send transactions and listen to event.

  • so what? the question was how to use metamask without popup. – Maxim Gaina Jun 14 '18 at 6:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.