Questions tagged [create2]

The tag has no usage guidance.

5 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
1answer
300 views

Can I use create2 to deploy minimal proxies in solidity, without using assembly?

Solidity 0.6.2 allows the creation of contracts with the create2 opcode via the new keyword and passing a salt in addition to any args. This is adequate for creating standard contracts, but what if I ...
2
votes
0answers
23 views

Security Implications of CREATE2 and SELFDESTRUCT

I was reading a discussion on the topic, i have two questions it is commented The SELFDESTRUCT and recreation cannot happen within one transaction, due to how SELFDESTRUCT operates. could someone ...
1
vote
0answers
30 views

How to prevent front-running the salt when using CREATE2?

I was looking at Optionality's clone-factory, which is based off EIP-1167, and wondering whether it can be ported to use CREATE2. One concern is that a third-party could, in theory, "front-run&...
1
vote
0answers
17 views

Using the contract owner as the salt for CREATE2

I have a factory contract, which creates child contracts. The child contract inherits from OpenZeppelin's Ownable, so it has an owner and a transferOwnership method. The factory contract uses CREATE2 ...
1
vote
0answers
17 views

Is there a way to deploy contracts with circular reference in 2 steps using create2?

Circular reference meaning contracts know each other addresses. So instead of deploy foo deploy bar(foo.address) foo.init(bar.address) Use some clever tricks to have only 2 deploy steps without an ...