odradev / odra

Odra framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pre-installation arguments validation

kpob opened this issue · comments

If a user deploys a contract in Odra it always succeeds (if argument types are correct).
The first place when any assertions occur is the constructor function.

If my contact has some modality, and expects the value to be in some range (eg. 0 to 3) and I deploy the contract with the value of 4, the contract should not be installed, the call function should revert. Now I can place the logic in the init function, but the contract will be installed, but I can't call the constructor again.

#407 makes it irrelevant. If the constructor call fails, the whole transaction is reverted.