everx-labs / TVM-Solidity-Compiler

Solidity compiler for TVM
GNU General Public License v3.0
125 stars 72 forks source link

Proposal: Add the ability to attach stateinit when calling contract interface #136

Closed pyAndr3w closed 4 months ago

pyAndr3w commented 1 year ago

Adding stateinit when calling the contract interface will allow you to "deploy" contracts without using a constructor. This will make it possible to create more flexible systems using more blockchain features (in TVM-based blockchains there is no concept of "deploy" as such)

expected syntax:

IContract(address).testFunction{ value: 1 ever, stateInit: cell }();

or

IContract(address).testFunction{ value: 1 ever, stateInit: builder }();

or

IContract(address).testFunction{ value: 1 ever, stateInit: slice }();
pyAndr3w commented 1 year ago

ability to specify stateinit with different data types will allow to optimize the code for building a message cell

BorisI commented 1 year ago

Sounds reasonable. Thank you!

IgorKoval commented 4 months ago

Thank you! Added to 0.75 release https://github.com/everx-labs/TVM-Solidity-Compiler/blob/master/API.md#external-function-calls