0

I attach the following image. Once a user creates a digital wallet (for example in MetaMask), then they receive a private key and a public address of their account as outputs.

Then, after having developed and compiled their smart contract they need to deploy it in the Ethereum blockchain. In order to do so they need to approve the transaction and pay for gas. For doing so, does the private key or their public address should "work" as an input to the "Deploy and approve transaction"?

In other words, in a visual way (as shown below), should a line from private key or from public address direct to the deploy and approve transaction?

My perspective is that the private key should be served as the input, since its like the means of signing a transaction. But since I am relative new to the Ethereum and blockchain world, I would need your help.

enter image description here

1
  • sorry i didn't get your querry Commented May 11, 2021 at 19:22

1 Answer 1

1

Yes, the private key is required to sign a transaction. That's the only way to make sure that your account is really the sender of the transaction. And that's part of the reason why private key should stay safe and never be revealed.

Also, the public address is derived deterministically from the private key, so there doesn't need to be connection between metamask and public address: one private key always results in one public address.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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