0

I am following the web3 documentation and I found that its possible to sign a contract and do a transaction directly from web3.

I want to call an onlyOwner function in my contract directly from a web page. I am looking for best practices as to where to store the private key and how to go by interacting with the contract securely?

  • 1
    Probably not a good idea to do this. Can you create a proxy service that pushes transactions to the network? – cleanunicorn Feb 13 '18 at 18:11
  • The private key is usually stored in the web3 provider (most often MetaMask). So the owner just signs the transaction as they would any other. Does that answer the question or did I misunderstand? – smarx Feb 13 '18 at 19:36

Your Answer

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

Browse other questions tagged or ask your own question.