2

Will that transaction function as if the signer sent it? I am assuming this is how limit orders for dapps such as Cowswap work.

For example (assuming this is true): wallet A signs a Uniswap transaction to swap tokenA for tokenB. Wallet B executes that transaction, whos wallet will recieve tokenB and pay for tokenA?

hear har
  • 77
  • 4
  • 1
    You can sign a transaction using one account (Wallet A) and then use the signed transaction to execute it from another account (Wallet B). The signed transaction contains the necessary data and authorization to perform the specified action, and it will function as if the original signer (Wallet A) sent it. TokenB will be sent to the destination wallet specified in the signed transaction, and the necessary amount of tokenA will be used as payment. – Canard Coca Aug 26 '23 at 06:33
  • Fairly clearly no, but can you clarify what you're Asking?

    Are you hoping to use the signature, or what?

    Are you hoping to execute the transaction on another account… which is not what you Asked?

    Are you hoping to execute a different transaction on another account?

    – Robbie Goodwin Aug 26 '23 at 21:53
  • @RobbieGoodwin I'm trying to replicate the example I gave, execute transactions which have been signed. The accepted reply answers this is possible. I didn't realize it didn't have to be sent by an EOA, rather just the signed tx has to be sent through an RPC. – hear har Aug 27 '23 at 00:23
  • @hearhar Thanks and I don't understand anything you just Posted.

    It might be vitally important and whatever you meant, 'I'm trying to replicate the example I gave, execute transactions which have been signed. The accepted reply answers this is possible. I didn't realize it didn't have to be sent by an EOA, rather just the signed tx has to be sent through an RPC…' simply does not work in English

    – Robbie Goodwin Aug 27 '23 at 18:00
  • @RobbieGoodwin Sorry, I don't know how to put it more clearly. You seem to be the only one having issues comprehending what I asked – hear har Aug 27 '23 at 22:13
  • Then good for you. Go ahead and sign it; use it; transact it as you will.

    I'm sorry you don't mind that jj1980's Answer lacks too much in English to be worth the screen it's Posted on, and that remains youir choice.

    – Robbie Goodwin Aug 27 '23 at 22:16

1 Answers1

3

If you build and sign a valid transaction transferring 1 Eth from your account A to another account B, this is exactly what the transaction will do, whoever submits it, and to whatever RPC it's being submitted.

If an external actor was attempting to take your transaction, replace the receiving address by an address of their own, then the transaction signature would not be valid anymore, and would be rejected by any node on the network.

To elaborate on your example, submitting a transaction to an RPC doesn't involve a wallet at all, it's just sending an RPC request containing the signed transaction. So the statement "wallet B sending a transaction signed by wallet A" does not make sense here.

jj1980
  • 151
  • 2