Create2 deployment

In @spalladino’s post Getting the most out of CREATE2, there’s a section on using the create2 deployment feature with a signer.

$ zos create2 --salt 43 --from 0x44
> Instance using salt 43 will be deployed at 0x654321
...
$ zos create2 MyContract --salt 43 --signature 0xabcdef --init initialize --from 0x88
> Instance of MyContract deployed at 0x654321

In the first command, is the --from address the signer and in the second command, the --from address is the address making the transaction?

My thinking is that the first command needs the signer address to compute the address that the proxy will be deployed to. In the second command, I was confused about why the address was different but thought it might be just the normal deploying address in that case.

3 Likes

Hey @chris.whinfrey! Hmm you are right that it seems confusing. The first command is actually missing the --query flag (I’ll make a note to update the post), and yes, --from would be the signer in that case.

In the second one, as you say, --from is the address that actually sends the transaction, and the signer is derived from the signature.

3 Likes

Thanks @spalladino! Makes sense. :ok_hand:

3 Likes