A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.
1

We solved this by having a one time init function. For full source, see ThingFactory.sol and Thing.sol. Basically, what you do is have this one time init function on your target contract (in the example, it would be Thing.) Then your factory contract calls the init function directly after creating the clone. The ...


1

You need to abi-encode the input arguments, and then append the result at the end of the bytecode before passing it to the create function. Suppose you have input arguments arg1, arg2 and arg3. I believe that you can more or less achieve that by changing this: bytes memory bytecode = _bytecode; To this: bytes memory bytecode = abi.encode(_bytecode, arg1,...


Only top voted, non community-wiki answers of a minimum length are eligible