-
Couldn't load subscription status.
- Fork 686
feat: london #1135
feat: london #1135
Conversation
…/ganache into feat/eip-1559-tx-david-temp
| accessList?: never; | ||
| maxPriorityFeePerGas?: never; | ||
| maxFeePerGas?: never; | ||
| export type LegacyRpcTransaction = Readonly<RpcTransaction> & { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious about the reasoning for this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should never mutate the json data a user gives us (like in provider.send("eth_sendTransaction", transaction)) but in one place in our code we were. Marking the type as Readonly prevents that sort of bug from happening.
It doesn't just throw with an "invalid remainder" message now :-)
| } | ||
|
|
||
| toJSON(includeFullTransactions = false) { | ||
| toJSON(includeFullTransactions = false, common: Common) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably fine to leave it as is and fix when we re-organize the transactions classes
| } | ||
|
|
||
| public toJSON(): EIP1559FeeMarketTransactionJSON { | ||
| public toJSON(_common?: Common): EIP1559FeeMarketTransactionJSON { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the _common is needed because the super class needs it because LegacyTransaction needs it. The _ makes the linter stop complaining about an unused variable.
| accessList?: never; | ||
| maxPriorityFeePerGas?: never; | ||
| maxFeePerGas?: never; | ||
| export type LegacyRpcTransaction = Readonly<RpcTransaction> & { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should never mutate the json data a user gives us (like in provider.send("eth_sendTransaction", transaction)) but in one place in our code we were. Marking the type as Readonly prevents that sort of bug from happening.
…/ganache into feat/eip-1559-tx-david-temp
baseFeePerGasto ablockbaseFeePerGasas the block'sgasPriceeffectiveGasPriceDESIGN-DECISIONS.mdto explain the change