Skip to content

CREATE/CREATE2 a contract with all possible first bytes#843

Merged
winsvega merged 2 commits intoethereum:developfrom
ewasm:deploy-invalid-bytes
May 14, 2021
Merged

CREATE/CREATE2 a contract with all possible first bytes#843
winsvega merged 2 commits intoethereum:developfrom
ewasm:deploy-invalid-bytes

Conversation

@gumb0
Copy link
Copy Markdown
Member

@gumb0 gumb0 commented May 11, 2021

Pulled out of #835 removing London expectations, should be useful on its own to check that deploying all undefined bytes is allowed in Berlin.

@gumb0 gumb0 requested review from qbzzt and winsvega May 11, 2021 12:07
network:
- 'Berlin'
result:
a94f5374fce5edbc8e2a8697c15331677e6ebf0b:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

can add a few addresses with deployed code here to show and to see that accounts with that bytecode has actually been deployed

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Added

code: |
:yul
{
// { mstore8(0, 0x00) return(0, 1) }
Copy link
Copy Markdown

@winsvega winsvega May 12, 2021

Choose a reason for hiding this comment

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

this is the contract constructor code.
so you need actually to return the bytecode of a contract that is being created. here it is 0x00

or do you try to create2 a contract with constructor code with invalid code before return?

Copy link
Copy Markdown
Member Author

@gumb0 gumb0 May 14, 2021

Choose a reason for hiding this comment

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

Yes, intention is to create contracts with code that consists of one byre

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Added some comments in yul code.

@gumb0 gumb0 force-pushed the deploy-invalid-bytes branch from f738c6d to 21d4d75 Compare May 14, 2021 09:30
@gumb0 gumb0 force-pushed the deploy-invalid-bytes branch from 21d4d75 to bdc88a2 Compare May 14, 2021 09:37
@gumb0 gumb0 requested a review from winsvega May 14, 2021 09:44
@winsvega winsvega merged commit 527dcd0 into ethereum:develop May 14, 2021
@axic axic deleted the deploy-invalid-bytes branch May 14, 2021 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants