Skip to content

Conversation

@cburgdorf
Copy link
Collaborator

No description provided.

@cburgdorf
Copy link
Collaborator Author

cburgdorf commented Jan 7, 2026 via email

@sbillig
Copy link
Collaborator

sbillig commented Jan 8, 2026

@cburgdorf I pushed up a fix for this, along with rebasing on master. Feel free to merge this if you're ready (I'll just close my create2 pr).

@sbillig
Copy link
Collaborator

sbillig commented Jan 8, 2026

I'm working on rebasing my other stuff on top of this, btw.

@sbillig sbillig marked this pull request as ready for review January 8, 2026 04:21
@sbillig
Copy link
Collaborator

sbillig commented Jan 8, 2026

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 43c1b0ca73

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +199 to +203
let init_off = C::init_code_offset()
let args_len = encoded_size<C::InitArgs>()
let total_len = init_len + args_len

// Build `initcode || abi.encode(args)` contiguously.

Choose a reason for hiding this comment

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

P2 Badge Account for dynamic ABI sizes in create()

The buffer length for constructor args is derived from encoded_size<C::InitArgs>(), which is just the static AbiSize constant. If an Encode impl uses append_tail to encode dynamic content (e.g., user-defined ABI types or future std types), the actual encoded length can exceed args_len, but total_len (and therefore the CREATE input) stays fixed at init_len + args_len. That will truncate the encoded args and lead to incorrect constructor decoding or deployment reverts. Consider either enforcing InitArgs to be statically sized only, or compute the real length via the encoder’s finish()/tail allocation before calling create_raw (same issue applies to create2).

Useful? React with 👍 / 👎.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is right, but we don't support encoding any dynamically-sized things yet. I'll create an issue.

@cburgdorf cburgdorf force-pushed the fe_test_cmd branch 3 times, most recently from 2f2ce9e to 43c1b0c Compare January 8, 2026 14:24
@cburgdorf cburgdorf changed the title WIP: Fe test cmd Fe test cmd Jan 8, 2026
@cburgdorf
Copy link
Collaborator Author

cburgdorf commented Jan 8, 2026

@cburgdorf I pushed up a fix for this, along with rebasing on master. Feel free to merge this if you're ready (I'll just close my create2 pr).

Sorry, I read this a little late and had force pushed your fix away with my own fix. I restored your fix now and will merge this.

@cburgdorf cburgdorf merged commit 2a62787 into master Jan 8, 2026
10 checks passed
@cburgdorf cburgdorf deleted the fe_test_cmd branch January 8, 2026 14:35
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.

3 participants