alloy-rs / examples

Example code for using alloy and alloy-core
Apache License 2.0
131 stars 30 forks source link

[Transactions]: Show encoding and decoding of various tx types. #44

Open yash-atreya opened 7 months ago

yash-atreya commented 7 months ago

Example that shows the encoding and decoding of the following tx types:

Eventually, also add an example for encoding and decoding of ReceiptEnvelope

zerosnacks commented 5 months ago

From James:

We don't want users to encode/decode TxEip___ or TxLegacy we always want them to wrap it into a TxEnvelope and use the 2718 encoding methods

We should be showing users how to convert a TransactionResponse into a TxEnvelope and then calling .recover_signer() and .tx_hash() and .encode_2718() etc?