Upgradeable

details

Inherited contract should implement verifyState(address) method by checking storage variables (see verifyState(address) in Dispatcher). Also contract should implement finishUpgrade(address) if it is using constructor parameters by coping this parameters to the dispatcher storage

notice

Base contract for upgradeable contract

methods

finishUpgrade(address)

details

Copy values from the new target to the current storage

params

_target

New target contract address

isOwner()

returns

_0

true if msg.sender is the owner of the contract.

owner()

returns

_0

the address of the owner.

renounceOwnership()

details

Allows the current owner to relinquish control of the contract.

notice

Renouncing to ownership will leave the contract without an owner. It will not be possible to call the functions with the onlyOwner modifier anymore.

transferOwnership(address)

details

Allows the current owner to transfer control of the contract to a newOwner.

params

newOwner

The address to transfer ownership to.

verifyState(address)

details

Method for verifying storage state. Should check that new target contract returns right storage value

stateVariables

UPGRADE_FALSE

details

Constants for isUpgrade field

isUpgrade

details

Upgrade status. Explicit uint8 type is used instead of bool to save gas by excluding 0 value

previousTarget

details

Previous contract address (if available). Used for rollback

stubSlot

details

Guarantees that next slot will be separated from the previous

target

details

Contracts at the target must reserve the same location in storage for this address as in Dispatcher Stored data actually lives in the Dispatcher However the storage layout is specified here in the implementing contracts