Skip to content
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

Make Account.code_hash Optional #753

Closed
carneiro-cw opened this issue May 2, 2024 · 2 comments
Closed

Make Account.code_hash Optional #753

carneiro-cw opened this issue May 2, 2024 · 2 comments
Labels

Comments

@carneiro-cw
Copy link
Contributor

Currently the code_hash for an account without bytecode is the Keccak256 hash of an empty string (0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470), we could make it optional since most accounts don't have bytecode.

@carneiro-cw
Copy link
Contributor Author

carneiro-cw commented May 2, 2024

Maybe it would make sense to move the fields that are exclusive to contracts (bytecode, code_hash, static_slot_indexes, mapping_slot_indexes), which would now all be optional, to a separate structure Contract with this information, and just add a Option to the Account struct.

@dinhani-cw
Copy link
Contributor

CodeHash can just be entirely removed, there is no use for it, so I will open an new issue for that and close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants