-
-
Notifications
You must be signed in to change notification settings - Fork 827
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
discussion: contract factories #2883
Comments
On second thought forcing everyone to use a generic multifactory where we log the constructor bytes might actually be a good idea!! |
Maybe you are looking for https://vyper.readthedocs.io/en/stable/built-in-functions.html#chain-interaction |
I saw that, but that is not what I am looking for, I am looking for regular |
A multi factory is not the same as a proxy, I want to actually make objects without the overhead A similar pattern to forwarder could be “copier” which deploys a copy of code using EXTCODECOPY (whatever it’s called) at given address provided |
5 out of 5 people I have asked for a way to create contracts in vyper and not use a forwarded have shown me the forwarder, it is pretty remarkable how bad I am at communicating |
https://github.com/ricobank/multifab I will close this now and make a new issue when we could maybe add this similar to forwarding contract that is currently built in |
Typically I suggest just deploying separately, because it's just a huge waste of space to store one contract in another. The link you shared is really interesting though, and might be a good idea for a built in function |
maybe worth a new builtin, either |
I think both would be good, maybe for these it makes sense just expose a typed version of select opcodes like |
Maybe generating 1 factory alongside each contract is a good approach too, then that factory defines the type |
can you sketch this a bit more? |
also related: #2891 |
|
@nmushegian nice table -- |
FWIW here is a minimal multifab with API we will use, to be optimized later https://github.com/ricobank/multifab/blob/18bdb7edef05bff21fd184238ba06a6d36c733e7/core/multifab.sol We plan to use it like this https://github.com/ricobank/snek/blob/0ec3651cbdc49481fcefffc1155d5d1c52ee2ebb/README.md |
I must be missing something obvious, how do I do
new MyContract()
from inside a contract? I can't find any reference in the docs or in the issues... A language that can't make factories is a non-starter IMO and the forwarder pattern adds gas overhead to the deployed objectThe text was updated successfully, but these errors were encountered: