0

Do smart contract wallets ever store priv/pub keys or something ? Of course, It would be then seen on the blockchain if it did, but I am asking this because somewhere, I've read that sometimes smart contract wallets SIGN the transaction. Not sure what that means but explanation and a little bit example would be great.

1
  • Well, obviously, when a smart-contract account executes a non-constant (neither pure nor view) function on some other contract, it implicitly signs the transaction. But there is no need to store a private key anywhere for this purpose. – goodvibration Dec 16 '20 at 23:21
0

sometimes smart contract wallets SIGN the transaction.

I'm not sure what you read, but what you said is incorrect or just worded in a confusing way. I'll try to unpack a summary to help sort things out.

There are two kinds of addresses in Ethereum: Contracts, and Externally Owned Accounts (EOA).

Contracts:

  1. Have code
  2. No one knows the signing (private) key. It exists, but since no one knows it this is moot.
  3. Cannot initiate a transaction
  4. Must execute code when a transaction is received

EOA

  1. Does not have code
  2. Someone knows the singing key
  3. Can initiate a transaction by signing and sending

The term "Smart Contract Wallets" is a misnomer. A wallet is a signing device that knows the signing key for one or more EOAs. Those senders can possibly send a transaction to a contract but it's an indirect link. No one is signing for the contract.

msg.sender

A contract can interact with another contract. In that context, the "sender" will be the contract that sent the message. The only way that can happen is if someone sends an instruction to the contract, from their EOA, and the contract does what the code tells it to do.

Hope it helps.

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.