1

I want to make an approved contract using Solidity and place the private key altering the state of a contract, for a certain address owner to obtain.

Can this be done, and how ?

0
2

It is possible to have a private key in a solidity contract but everything on the blockchain is public so anyone will have access to the private key. In other words, it is not possible to properly place the private key on a verified contract while restricting the access only to a specified target.

The private keyword doesn't obfuscate data. For example it is available through web3.eth.getStorageAt.

Depending on the problem publishing encrypted data is an alternative.

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.