Questions tagged [create2]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
0answers
23 views

Can CREATE2 with the same salt override existing contract?

Deployed: https://rinkeby.etherscan.io/address/0x121e370ae349425d0d744f6db43c2f43e777f972#code pragma solidity 0.8.3; contract Test { uint256 public a; constructor (uint256 _a) public { ...
1
vote
1answer
75 views

How to implement the CREATE2 in Python

I'd like to know either how to implement the skinny CREATE2 in Python or a package that provides it. This is the function I'm trying to port from TypeScript to Python. It calls generateAddress2 with ...
1
vote
0answers
14 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 ...
1
vote
1answer
121 views

Why does the creationCode of this contract change if a change is made in the importing contract?

For the following: pragma solidity >=0.5.0; contract Include { uint z = 1; } contract CreationCode { uint k = 1; function get() external returns (bytes32) { return keccak256(...
1
vote
0answers
75 views

How i can calculate deterministic address from contract clone (create2)

Is there any way to calculate the deterministic address of a contract cloned by a Factory through create2? I have this contract Factory contract ForwarderFactory { function cloneForwarder(address ...
1
vote
1answer
184 views

How to calculate CREATE2 address in golang?

I have a factory pattern smart contract that creates other smart-contracts by cloning the master smart contract via Minimal Proxy Contract and CREATE2 opcode. What is the proper way to calculate ...
0
votes
0answers
34 views

calculate deployment address of create2 minimal proxy implementation

The following functions works fine (the deployed and calculated address matches) if the implementation is done without minimal proxy function getDeploymentAddress(uint256 num) public view returns (...
7
votes
4answers
1k views

Is it possible to batch approve + transfer with CREATE2?

In our dapp, we currently have the following user flow: Approve the Sablier contract to spend up to x ERC20 tokens Transfer the x ERC20 tokens to the Sablier contract This is not super bad UX, but ...
3
votes
1answer
215 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 ...
5
votes
2answers
1k views

Is it possible to deploy a contract using create2 in Solidity?

Can I deploy a contract in Solidity (not in-line assembly) using create2?
1
vote
1answer
54 views

Does create2 increase the nonce of the computed contract’s deployment address?

Simple question about create2 failure. Does create2 increase the nonce of the computed contract’s deployment address ? Or does the first nonce increment operation happens after the first call to the ...
4
votes
1answer
98 views

How does eip1014 (create2) make collisions possible?

In the Clarifications section of EIP 1014 (create2) it says that "This EIP makes collisions possible." It doesn't explain how collisions are now possible, but it links to EIP 684 (Prevent ...