1

I have read that msg.sender is the address of the person interacting with the blockchain. Does it mean a wallet address ? Do we always specify an address when we interact with contract i.e. deploy as well as web3.js calls ?

Also, the address is publicly known, so is there a role of a private key/json file stored which only a owner of a wallet have ? (Public/Private key communication like ssh).

1

msg.sender is the address of the caller of the current contract. msg.sender could be either a smart contract or a wallet (external account).

There's also tx.origin, which what you described: the signer of the transaction in which the call was made. That's always an external account. Use it with care, though.

More info here

  • What address ? Wallet/account address ? – Vivek Sadh Aug 2 '18 at 8:31

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.