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

fix: use get_deployed_bytecode_bytes for codesize #3132

Merged
merged 1 commit into from Sep 8, 2022

Conversation

transmissions11
Copy link
Contributor

Motivation

The EVM contract size limit applies to runtime bytecode, NOT constructor code.

Source:

https://github.com/ethereum/EIPs/blob/master/EIPS/eip-170.md

https://github.com/ethereum/go-ethereum/blob/d30e39b2f833fb75f1e529cd405061fb6b548b8d/core/vm/evm.go#L453-L458 (shoutout @mds1 for this link)

Solution

Using get_deployed_bytecode_bytes should measure runtime bytecode instead.

@transmissions11 transmissions11 changed the title fix: get_deployed_bytecode_bytes for codesize fix: use get_deployed_bytecode_bytes for codesize Sep 8, 2022
@onbjerg onbjerg added the T-bug Type: bug label Sep 8, 2022
Copy link
Member

@onbjerg onbjerg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@onbjerg onbjerg merged commit 16658aa into foundry-rs:master Sep 8, 2022
iFrostizz pushed a commit to iFrostizz/foundry that referenced this pull request Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bug Type: bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants