Function: setImplementation(byte[32] implementation_id, address implementation, bytes[32] upgrade_data, bool callUpdate)
This allows the owner to register a new master logic contract.
Inputs
implementation_id
Control: Fully controlled by the owner.
Constraints: None.
Impact: The ID where the implementation will be registered.
implementation
Control: Fully controlled by the owner.
Constraints: Checked that the implementation is a valid contract.
Impact: The implementation to be registered.
upgrade_data
Control: Fully controlled by the owner.
Constraints: None.
Impact: The upgrade data to be passed to the clone's upgrade function.
callUpdate
Control: Fully controlled by the owner.
Constraints: None.
Impact: Whether to call the upgrade function on the clones or not.
Branches and code coverage (including function calls)
Intended branches
If
implementation_id
already exists, update the implementation's clone instances.
Negative behavior
Should not be callable by anyone other than the owner.
Should NOT allow upgrading to an implementation that has a different storage layout. This is not checked.