What is the purpose of signTransaction? How do you verify the signed tx on-chain? #2744
-
Hello, what is the purpose of using I'm trying to sign a transaction using Ethers.js, and then I want to be able to use that transaction in another transaction. Is it possible to batch transactions together? This is kind of what I was trying but wasn't working: const tx = await contract.populateTransaction.approve(
owner.address,
contract.address
);
const signedTx = await wallet.signTransaction(tx);
const { v, r, s } = parseTransaction(signedTx);
await contract.verifyTxSplit(signedTx, v, r, s)
await contract.verifyTxHash(signedTx) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I don't quite understand what you are trying to do, but that isn't what There isn't really a way to verify a contract in a Contract, unless you write lots of complex Solidity code to parse RLP data, and understand the various transaction envelopes. This would be quite a bit of work. And it would be expensive. You also cannot batch transactions together using an EOA (externally owned account), and this is something you would require a Smart Contract (SC) to achieve. The most popular SC wallet for executing multiple operations at once is Gnosis Safe if you are looking for a place to start. If you are looking to verify the hash, as an opaque octet stream, your above example requires the transaction pre-image, which you can get using The purpose of Does that make sense? |
Beta Was this translation helpful? Give feedback.
I don't quite understand what you are trying to do, but that isn't what
.signTransaction
is for. :)There isn't really a way to verify a contract in a Contract, unless you write lots of complex Solidity code to parse RLP data, and understand the various transaction envelopes. This would be quite a bit of work. And it would be expensive.
You also cannot batch transactions together using an EOA (externally owned account), and this is something you would require a Smart Contract (SC) to achieve. The most popular SC wallet for executing multiple operations at once is Gnosis Safe if you are looking for a place to start.
If you are looking to verify the hash, as an opaque octet stream, your abo…