pcaversaccio / create2deployer

Helper smart contract to make easier and safer usage of the `CREATE2` EVM opcode.
MIT License
288 stars 42 forks source link

💥 Add Kroma Sepolia & Mainnet Deployments #182

Closed Pangssu closed 9 months ago

Pangssu commented 9 months ago

Hi, I am requesting to deploy to the Kroma mainnet! Please check the chain information below.

And let me know how much ETH I need to send to the deployer address.

pcaversaccio commented 9 months ago

Hi, I am requesting to deploy to the Kroma mainnet! Please check the chain information below.

And let me know how much ETH I need to send to the deployer address.

Hey, thanks for your request. Kroma is fully EVM equivalent correct? I think it's worth to also deploy on Kroma Sepolia for testing. Can you send 0.2 ETH on Mainnet and Sepolia to the deployer address 0x554282Cf65b42fc8fddc6041eb24ce5E8A0632Ad please? It's more than enough and I will return all remaining funds after the deployment, I just need some security buffer.

Furthermore, I would also like to highlight that I built CreateX a more versatile version of Create2Deployer and if you're interested, I can also deploy that one on Kroma Mainnet & Sepolia. For that one, I would need 0.3 ETH on 0xeD456e05CaAb11d66C4c797dD6c1D6f9A7F352b5 for Mainnet & Sepolia. Again, it's more than enough and I will return all remaining funds after the deployment, I just need some security buffer here as well since I experienced in the past some weird RPC behaviours of new chains where they charged more than expected.

Pangssu commented 9 months ago

Create2Deployer is already deployed on Kroma Sepolia because Kroma is optimism based and Kroma Sepolia has been upgraded to the Canyon. Therefore, you only need to deploy to the Kroma Mainnet.

I sent 0.2 ETH to 0x554282Cf65b42fc8fddc6041eb24ce5E8A0632Ad on the Kroma Mainnet. https://kromascan.com/tx/0x85f56006f1f69748840cb929ca789dee16787c5817a1393ec06e49cf232118c3

And as for the CreateX deployment, I'll let you know once I've made a decision within the team.

pcaversaccio commented 9 months ago

Create2Deployer is already deployed on Kroma Sepolia because Kroma is optimism based and Kroma Sepolia has been upgraded to the Canyon. Therefore, you only need to deploy to the Kroma Mainnet.

I sent 0.2 ETH to 0x554282Cf65b42fc8fddc6041eb24ce5E8A0632Ad on the Kroma Mainnet. https://kromascan.com/tx/0x85f56006f1f69748840cb929ca789dee16787c5817a1393ec06e49cf232118c3

And as for the CreateX deployment, I'll let you know once I've made a decision within the team.

Oh you're OP Stack powered, nice. Yeah just verified that Create2Deployer is available on Sepolia image

The contract is however not visible in the block explorer (since it's a predeploy, the explorers must index it manually): https://sepolia.kromascan.com/address/0x13b0D85CcB8bf860b6b79AF3029fCA081AE9beF2

A quick question: I assume you will also upgrade the mainnet to Canyon? This would make that deployment completely unnecessary tbh because the deployed bytecode & storage will be overwritten at upgrade time.

Pangssu commented 9 months ago

That's great. I'll ask Etherscan to display the code in the explorer.

As you said, Create2Deployer should have been deployed when the Kroma Mainnet was also upgraded to Canyon. Unfortunately, it didn't deployed because we didn't match the hard fork time and block time correctly, which was our mistake.

pcaversaccio commented 9 months ago

That's great. I'll request to Etherscan to display the code in the explorer.

As reference, this is how it should look like: https://basescan.org/address/0x13b0D85CcB8bf860b6b79AF3029fCA081AE9beF2#code

As you said, Create2Deployer should have been deployed when the Kroma Mainnet was also upgraded to Canyon. Unfortunately, it didn't deployed because we didn't match the hard fork time and block time correctly, which was our mistake.

But what about future upgrades? Shouldn't this activate retrospectivaley the predeploys added in previous upgrades? I can deploy CreateDeployer now, but that one will not match the predeploy version (shouldn't be an issue tbh). I just want to understand what are the implications here. Also, what address should I return the remaining funds back?

Pangssu commented 9 months ago

As you said, we can deploy a predeployed version in a future upgrade, but since we don't have a future hard fork planned yet. And the feature that should have been applied in Canyon have not been applied, so i want to normalize it with a different way.

The address to return is 0xfd5d4e55ad6c242195a08ff226f0ea23d375a309.

pcaversaccio commented 9 months ago

Ok resolved via https://github.com/pcaversaccio/create2deployer/commit/cfc1eb743a581cc87dcf26b122247d367c99eef9. The contract is available here: https://kromascan.com/address/0x13b0D85CcB8bf860b6b79AF3029fCA081AE9beF2.

I also renounced ownership as usual for Create2Deployer (due to some legacy reasons), so it's completely trustless. The remaining funds are transferred back to you: https://kromascan.com/tx/0x13b6e12115937e6457708cdcc97f54b453e4737f6fba9d74c9785ff07326fe81.

If you want to have a CreateX deployment, please open an issue in my repo here: https://github.com/pcaversaccio/createx.

Pangssu commented 9 months ago

Thank you so much for your help :)