web3swift
web3swift copied to clipboard
Cover EIP-1559 PRs with more tests
Cover EIP-1559 PRs with more tests. #509 #510 — this one covered by tests with design and logic inspired of geth yet.
#509 includes a suite of tests added into LocalTests/web3TransactionsTests.swift
These tests take a JSON representation of a signed transaction and converts it into a EtereumTransaction
via the Decodable
protocol. It then validates the transaction hash, which is calculated by re-encoding the decoded data and hashing it, thus the encoder is tested here as well. Finally it validates that the Signing sender address is correctly recovered. This process is then repeated for an raw (RLP) Input bytestream. I do this process to test all transaction forms/types from Fallback all the way up to EIP-1559 with accessList data present. (the signed references were created in ethers.js)
The only things not tested there is signing, and the JSON encoding. I hadn't gotten that far yet.
signing tests have now been added