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

deployCode errors (did not match any variant of untagged enum Bytecode) #6815

Closed
2 tasks done
davidbrai opened this issue Jan 16, 2024 · 4 comments
Closed
2 tasks done
Labels
T-bug Type: bug

Comments

@davidbrai
Copy link

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (24abca6 2024-01-16T00:22:43.818205838Z)

What command(s) is the bug in?

forge test

Operating System

Linux

Describe the bug

The following code:

address d = deployCode(
    './foundry-out/NounsDescriptorV2.sol/NounsDescriptorV2.json',
    abi.encode(address(0), address(0))
);

fails with the following error:

[FAIL. Reason: setup failed: data did not match any variant of untagged enum Bytecode at line 1 column 34294] setUp() (gas: 0)

I've attached the json file.

NounsDescriptorV2.json

@mattsse
Copy link
Member

mattsse commented Jan 16, 2024

the issue here is that your bytecode is still unlinked

I think we should add support for linking bytecode via cheatcodes here

@davidbrai
Copy link
Author

@mattsse thanks for the quick diagnosis!

any estimate on when support for linking bytecode will be available?
any workaround we can use in the meantime?

@mattsse
Copy link
Member

mattsse commented Jan 16, 2024

any estimate on when support for linking bytecode will be available?

just checked this is a known feature request, can try to bump prio for this #6120

workaround would probably be to deploy the linked library first then replace in the code, or do this via an ffi command

@DaniPopes
Copy link
Member

Closing as duplicate of #6120.

@DaniPopes DaniPopes closed this as not planned Won't fix, can't repro, duplicate, stale Jan 19, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Foundry Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bug Type: bug
Projects
Archived in project
Development

No branches or pull requests

3 participants