I have a transaction which I sign and broadcast later.

If i try to broadcast the signed TX the sender address is incorrect.

If i recover the address from the signature it is of course the correct one but upon adding it to the TX it stops working?

        const serializedTx = ethers.utils.serializeTransaction(txData)
        console.log('SERIALIZED TX: ' + serializedTx);

        const signature = await ethereum.request({
            method: 'eth_sign',
            params: [web3.currentProvider.selectedAddress, web3.utils.sha3(serializedTx)]
        console.log('SIGNATURE: ' + signature);

        const newTxObj = ethers.utils.parseTransaction(serializedTx)
        const signedTx = ethers.utils.serializeTransaction(txData, signature)
        console.log('ETHERS SIGNED TX: ' + signedTx)

If I decode the signed TX the sender address does not match the signature address


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.