Skip to content

CoreInternals ​

Git Source

Inherits:StorageRead, Events, Error

State Variables ​

_ADMIN_SLOT ​

Storage slot with the admin of the contract. This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is validated in the constructor.

solidity
bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;

_DUMMY_IMPLEMENTATION_SLOT ​

Storage slot with the address of the current dummy-implementation. This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is validated in the constructor.

solidity
bytes32 internal constant _DUMMY_IMPLEMENTATION_SLOT =
    0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;

_SIG_SLOT_BASE ​

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

solidity
bytes32 internal constant _SIG_SLOT_BASE = 0x000000003ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;

Functions ​

_getSlotImplSigsSlot ​

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

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

_getSlotSigsImplSlot ​

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

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

_getAddressSlot ​

Returns an address data_ located at slot_.

solidity
function _getAddressSlot(bytes32 slot_) internal view returns (address data_);

_setAddressSlot ​

Sets an address data_ located at slot_.

solidity
function _setAddressSlot(bytes32 slot_, address data_) internal;

_getSigsSlot ​

Returns an SigsSlot with member value located at slot.

solidity
function _getSigsSlot(bytes32 slot_) internal pure returns (SigsSlot storage _r);

_setImplementationSigs ​

Sets new implementation and adds mapping from implementation to sigs and sig to implementation.

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

_removeImplementationSigs ​

Removes implementation and the mappings corresponding to it.

solidity
function _removeImplementationSigs(address implementation_) internal;

_getImplementationSigs ​

Returns bytes4[] sigs from implementation address. If implemenatation is not registered then returns empty array.

solidity
function _getImplementationSigs(address implementation_) internal view returns (bytes4[] memory);

_getSigImplementation ​

Returns implementation address from bytes4 sig. If sig is not registered then returns address(0).

solidity
function _getSigImplementation(bytes4 sig_) internal view returns (address implementation_);

_getAdmin ​

Returns the current admin.

solidity
function _getAdmin() internal view returns (address);

_getDummyImplementation ​

Returns the current dummy-implementation.

solidity
function _getDummyImplementation() internal view returns (address);

_setAdmin ​

Stores a new address in the EIP1967 admin slot.

solidity
function _setAdmin(address newAdmin_) internal;

_setDummyImplementation ​

Stores a new address in the EIP1967 implementation slot.

solidity
function _setDummyImplementation(address newDummyImplementation_) internal;

Structs ​

SigsSlot ​

solidity
struct SigsSlot {
    bytes4[] value;
}