You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although the concept of smart contract is based on inmutability of the logic, the alternative upgradable contract is gaining momentum. There are many implementations in Ethereum, most of them using a proxy contract.
This improvement proposal allows that any contract could be upgradble, given a control logic to accept the change.
The idea is based on invoke a defined public method:
function upgradeCode(bytes memory newcode) public returns (bytes memory)
In this function, explicitly added by the contract author, the logic could accept or not the new code (the bytes sent in the parameter). The bytes returned ARE THE NEW ACCEPTED code. So, the logic could control the sender account, or some freeze logic in the contract that reject the change.
The virtual machine execution code should be modified so the return of this invocation (if the returned value is not the empty byte array) changes the code of the contract account.
The text was updated successfully, but these errors were encountered:
Although the concept of smart contract is based on inmutability of the logic, the alternative upgradable contract is gaining momentum. There are many implementations in Ethereum, most of them using a proxy contract.
This improvement proposal allows that any contract could be upgradble, given a control logic to accept the change.
The idea is based on invoke a defined public method:
In this function, explicitly added by the contract author, the logic could accept or not the new code (the bytes sent in the parameter). The bytes returned ARE THE NEW ACCEPTED code. So, the logic could control the sender account, or some freeze logic in the contract that reject the change.
The virtual machine execution code should be modified so the return of this invocation (if the returned value is not the empty byte array) changes the code of the contract account.
The text was updated successfully, but these errors were encountered: