-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
The instantiation works different on out platform than on Eth. That is probably the biggest difference people will experience early on. We documented this behaviour but it is not enough. We need concrete examples of instantiation patterns that don't work and what to do instead. The good news is that contract instantiation is easier and more efficient on our platform without the need to drop down to assembly.
Topics we need to cover:
- Tell people not to use
create
orcreate2
directly. Instead use thenew
keyword. Use it with thesalt
parameter ifcreate2
is needed. - IF THEY REALLY NEED TO USE ASSEMBLY (i dont know why they would though): How to properly use
create2
: Wrong output forcreationCode
contract-issues#45. Including the differences in.creationCode
which get relevant then. - Always mention that the code has to be uploaded before and explain how this is better since we are not bundling huge amounts of code into a contract which limits the size the deployee could have.
- Cover use cases where creation code is generated on the fly (stitching it together from runtime code). Mention how this is not necessary due to on-chain constructors.
- Explain how to compute the address of the new contract on chain (difference in
.creationCode
). I am not sure why this is necessary though. To be it seems that predicting the address is something you want to do off-chain.
xermicus
Metadata
Metadata
Assignees
Labels
No labels