Skip to content

InfiniteProxyRollbackModule ​

Git Source

Inherits:RollbackCoreInternals, RollbackEvents

Title: InfiniteProxy rollback module

Allows the team multisig to roll back to a previously registered implementation or dummy implementation within a time window after upgrades.

Upgrades are expected to happen infrequently (every few months). Performing an upgrade while another upgrade is still within its active rollback window is not an expected scenario and is not supported. The design assumes the rollback period will have elapsed before any new upgrade is performed.

Functions ​

onlyAdmin ​

Only admin guard

solidity
modifier onlyAdmin() ;

onlyMultisig ​

Only team multisig guard

solidity
modifier onlyMultisig() ;

registerRollbackDummyImplementation ​

Register the current dummy implementation for rollback.

solidity
function registerRollbackDummyImplementation() external onlyAdmin;

rollbackDummyImplementation ​

Rollback to the previously registered dummy implementation.

solidity
function rollbackDummyImplementation() external onlyMultisig;

registerRollbackImplementation ​

Register a currently active implementation as rollback implementation. To be triggered before upgrade.

solidity
function registerRollbackImplementation(address rollbackImplementation_, address newImplementation_)
    external
    onlyAdmin;

Parameters

NameTypeDescription
rollbackImplementation_addressThe currently active implementation to rollback to.
newImplementation_addressThe new implementation being upgraded to, which is replaced by the old one in the rollback.

rollbackImplementation ​

Rollback a currently active implementation to its' previously registered implementation.

solidity
function rollbackImplementation(address rollbackImplementation_, address newImplementation_) external onlyMultisig;

Parameters

NameTypeDescription
rollbackImplementation_addressThe implementation to rollback to.
newImplementation_addressThe new, recently upgraded currently active implementation being replaced by the old one in the rollback.

cleanupExpiredRollbackImplementation ​

Clean up expired rollback storage for an implementation. Callable by anyone once ROLLBACK_PERIOD has elapsed.

solidity
function cleanupExpiredRollbackImplementation(address implementation_) external;

Parameters

NameTypeDescription
implementation_addressThe rollback implementation whose storage should be cleaned up.

getRollbackForImplementation ​

Returns rollback data for a certain implementation address

solidity
function getRollbackForImplementation(address rollbackImplementation_)
    external
    view
    returns (RollbackSigsSlot memory rollbackData_);

getRollbackDummyImplementation ​

Returns rollback dummy-implementations's addres and the registered rollback timestamp

solidity
function getRollbackDummyImplementation()
    external
    view
    returns (address rollbackDummyImplementation_, uint256 rollbackRegisterTimestamp_);