Do not store self smart-contract code: use MYCODE asm instruction instead #1012
Labels
gas
Gas consumption and fee-related things
optimizations
scope: codegen
Code generation, a.k.a. compiler backend
Milestone
The problem
Lets take a look on a 2 simple smart-contracts:
Under the hood, both Parent and Child contracts stores the code of
Child
smart contract in the system dictionary, because in both of theminitOf Child()
used.But storing code of
Child
smart contract insideChild
is useless because one can callMYCODE
asm instruction to get it.This approach would reduce not only storageFees, but also forwardFees when initializing new smart-contracts.
It is really useful feature for developing
Jetton
smart contracts (when one child deploys another child), which optimizes fees a lot.Feel free to argue to my point.
The text was updated successfully, but these errors were encountered: