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

EVM: Deploy smart contract with salt and bytecode not possible! #2905

Closed
Meiswinkel1991 opened this issue Apr 23, 2024 · 3 comments
Closed
Assignees
Labels

Comments

@Meiswinkel1991
Copy link

Summary

Deploying a contract using a salt and a bytecode leads to a successful transaction. But the address of the deployed contract does not contain any bytecode after the transaction.
This means it is not possible to use the precomputed address with CREATE2.

Steps to Reproduce

Example:

I created a contract factory. I can also determine my future address using CREATE2, but deploying the contract doesn't work. I'll send the address of the deployed contract. This has no bytecode but events are tracked. This seems like a bug to me.

Example contract deployed with salt and bytecode

The following link shows the FactoryContract. A new contract with a “salt” should be deployed in the “createWallet” function. But it doesn't work.

Example contract of a contract factory

@Jouzo Jouzo self-assigned this Apr 26, 2024
@Jouzo
Copy link
Collaborator

Jouzo commented Apr 26, 2024

This should work. I'll look into it.

@Jouzo
Copy link
Collaborator

Jouzo commented May 6, 2024

Validated with a simple example https://solidity-by-example.org/app/create2/ that create2 works.
We can at least rule out any issue with the VM itself for now.

@prasannavl
Copy link
Member

Closing this as it indeed is possible and works as expected.
Please feel free to open another issue in case you continue to have issues.

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

3 participants