New answers tagged

0

This is an issue with the transaction library: https://github.com/web3p/ethereum-tx. Use the following library instead. https://github.com/kornrunner/php-ethereum-offline-raw-tx It's working fine with me now.


0

This is an issue with the transaction library: https://github.com/web3p/ethereum-tx. Use the following library instead. https://github.com/kornrunner/php-ethereum-offline-raw-tx It's working fine with me now.


1

Previous answer is great and works but if you want a shorter code using only 3rd libraries, you can do this: import rlp from eth_typing import HexStr from eth_utils import to_bytes from ethereum.transactions import Transaction def hex_to_bytes(data: str) -> bytes: return to_bytes(hexstr=HexStr(data)) Then, to decode: txs = rlp.decode(hex_to_bytes(&...


2

The recid value (v) is only a way to speed up verification and address recovery, as explained here. So your actual v value is defined in {0, 1, 2, 3}. In the Ethereum network the recid value (v) is computed that way since EIP-155 which was included in the Spurious Dragon fork from EIP-607 (to protect against tx replay attack with Ethereum classic) : {0,1} + ...


-1

I am glad you managed to figure out the answer. To anyone else who is struggling, I managed to do the same but with LegacyTx instead of DynamicFeeTx. Seeing as I've been struggling on this the past day, I thought I would paste the full code to give a better picture for anyone else. pendingNonce, err := client.PendingNonceAt(context.Background(), fromAddress) ...


Top 50 recent answers are included