Commit Graph

4 Commits

Author SHA1 Message Date
Fang
4692c10fe2
ethereum: add support for eip-1559 transactions
Adds a new transaction type and signing method for eip-1559-style
transactions.

Includes a $typed-transactions type which can support any number of
eip-2718-style typed transactions.
2021-09-18 20:41:33 +02:00
Fang
3c5fd9fda6
ethereum: ensure "to" value is 20 bytes wide
Previously, this would measure as <20 bytes for addresses with leading
zeroes. This resulted in transactions with unexpected behavior.
For example, sending ETH to the zero address would create a contract
instead.

Here we switch to using +encode:rlp directly and indicate a width of
20 bytes for the "to" field.
2021-09-18 20:41:26 +02:00
Fang
0c1e999cdb
ethereum: fix bug with rlp encoding of zero bytes
Null bytes in lists were getting eaten during concatenation. To avoid
this, we track encoded item widths (which are always 1 or higher) and
+can them all together.

This likely did not affect any of the other Ethereum code, considering
it nearly always measures atoms, and the null byte would be seen as
no bytes in that case.
2021-09-18 20:41:14 +02:00
fang
25a55c0f63
various: ethereum, azimuth, json-rpc out of zuse
Moves them into files in /lib, and updates dependents accordingly.
2020-12-06 17:26:52 +01:00