Skip to content

RollbackCoreInternals ​

Git Source

Inherits:CoreInternals

Constants ​

_ROLLBACK_DUMMY_IMPLEMENTATION_SLOT ​

solidity
bytes32 internal constant _ROLLBACK_DUMMY_IMPLEMENTATION_SLOT =
    0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143

_ROLLBACK_SIG_SLOT_BASE ​

use EIP1967 proxy slot (see _ROLLBACK_DUMMY_IMPLEMENTATION_SLOT) except for first 4 bytes,

solidity
bytes32 internal constant _ROLLBACK_SIG_SLOT_BASE =
    0x0000000016fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143

TEAM_MULTISIG ​

Team multisigs allowed to trigger rollback

solidity
address public constant TEAM_MULTISIG = 0x4F6F977aCDD1177DCD81aB83074855EcB9C2D49e

ROLLBACK_PERIOD ​

duration for how long team multisig is allowed to trigger a rollback after it has been registered

solidity
uint256 public constant ROLLBACK_PERIOD = 7 days

Functions ​

_setUintSlot ​

Sets a uint data_ located at slot_.

solidity
function _setUintSlot(bytes32 slot_, uint256 data_) internal;

_getUintSlot ​

Returns a uint data_ located at slot_.

solidity
function _getUintSlot(bytes32 slot_) internal view returns (uint256 data_);

_getRollbackSlotImplSigsSlot ​

Returns the storage slot which stores the sigs array set for the rollback implementation.

solidity
function _getRollbackSlotImplSigsSlot(address implementation_) internal pure returns (bytes32);

_getRollbackSlotSigsImplSlot ​

Returns the storage slot which stores the rollback implementation address for the function sig.

solidity
function _getRollbackSlotSigsImplSlot(bytes4 sig_) internal pure returns (bytes32 result_);

_getRollbackSigsSlot ​

Returns an RollbackSigsSlot with member value and rollbackRegisterTimestamp located at slot.

solidity
function _getRollbackSigsSlot(bytes32 slot_) internal pure returns (RollbackSigsSlot storage _r);

_setRollbackImplementationSigs ​

Sets new rollback implementation and adds mapping from implementation to sigs and sig to implementation. this method is almost the same as _setImplementationSigs in ./proxy.sol, just adjusted for using rollback slots, no event, and custom errors

solidity
function _setRollbackImplementationSigs(address implementation_, bytes4[] memory sigs_) internal;

_removeRollbackImplementationSigs ​

Removes rollback implementation and the mappings corresponding to it. this method is similar as _removeImplementationSigs in ./proxy.sol, just only the remove sigs logic adjusted for using rollback slots

solidity
function _removeRollbackImplementationSigs(bytes4[] memory sigs_) internal;

Structs ​

RollbackSigsSlot ​

solidity
struct RollbackSigsSlot {
    uint40 rollbackRegisterTimestamp;
    address replacesImplementation; // address of the newly registered implementation that is supposed to be rolled back to the rollback registered one
    bytes4[] sigs;
}