-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add test block with EIP-2930 tx #1376
Conversation
// the following methods are copied verbatim from | ||
// DefaultStateManager | ||
|
||
public isWarmedAddress(address: Buffer): boolean { |
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.
What about doing return DefaultStateManager.prototype.isWarmedAddress.call(this, address)
instead? The same for the rest of the methods.
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.
Good idea, I'll give it a try.
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.
Done. Notice that this adds an implicit dependency between those method calls and certain instance variables that have to exist (_accessedStorage
and _accessedStorageReverted
). tsc
doesn't seem to catch those errors.
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.
Maybe leave a comment? Either thing is dangerous in its own way
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.
There is one:
// used by the DefaultStateManager calls
private _accessedStorage: Array<Map<string, Set<string>>> = [new Map()];
private _accessedStorageReverted: Array<Map<string, Set<string>>> = [
new Map(),
];
packages/hardhat-core/test/internal/hardhat-network/provider/node.ts
Outdated
Show resolved
Hide resolved
I left a few small comments, but LGTM |
packages/hardhat-core/src/internal/hardhat-network/provider/fork/rpcToTxData.ts
Show resolved
Hide resolved
packages/hardhat-core/src/internal/core/jsonrpc/types/output/transaction.ts
Show resolved
Hide resolved
Co-authored-by: Patricio Palladino <email@patriciopalladino.com>
RpcTransaction
typeEIP2929StateManager
interface inForkStateManager