SetContext
Library for managing the execution context of a set contract.
Stores contextual metadata—such as set ID, registry addresses, and revision numbers— in a dedicated ERC-7201 storage slot. Designed to support modular, pluggable set features.
State Variables
LOCATION
keccak256(abi.encode(uint256(keccak256("every.storage.SetContext")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant LOCATION = 0x9a9ae33f5929d69d85755390eef01c6883da9e8043b3c1e288ad073bd8ad3600;
Functions
ctx
Internal accessor for storage struct.
function ctx() internal pure returns (SetContextStorage storage $);
setSetRegistry
Sets the address of the SetRegistry.
function setSetRegistry(address setRegistry) internal;
setSetId
Sets the ID of the current set.
function setSetId(uint64 setId) internal;
setSetRev
Sets the revision of the current set.
function setSetRev(uint32 setRev) internal;
setKindRegistry
Sets the address of the KindRegistry.
function setKindRegistry(address setRegistry) internal;
setKindId
Sets the kind ID of the current object.
function setKindId(uint64 kindId) internal;
setKindRev
Sets the kind revision of the current object.
function setKindRev(uint32 kindRev) internal;
setOmniRegistry
Sets the address of the OmniRegistry.
function setOmniRegistry(address omniRegistry) internal;
setObjectMinter
Sets the address of the ObjectMinter.
function setObjectMinter(address objectMinter) internal;
getSetRegistry
Gets the address of the SetRegistry.
function getSetRegistry() internal view returns (address);
getSetId
Gets the ID of the current set.
function getSetId() internal view returns (uint64);
getSetRev
Gets the revision of the current set.
function getSetRev() internal view returns (uint32);
getOmniRegistry
Gets the address of the OmniRegistry.
function getOmniRegistry() internal view returns (address);
getKindRegistry
Gets the address of the KindRegistry.
function getKindRegistry() internal view returns (address);
getKindId
Gets the kind ID of the current object.
function getKindId() internal view returns (uint64);
getKindRev
Gets the kind revision of the current object.
function getKindRev() internal view returns (uint32);
getObjectMinter
Gets the address of the ObjectMinter.
function getObjectMinter() internal view returns (address);
Structs
SetContextStorage
Note: storage-location: erc7201:every.storage.SetContext
struct SetContextStorage {
address setRegistry;
uint64 setId;
uint32 setRev;
address omniRegistry;
uint96 _reserved0;
address kindRegistry;
uint64 kindId;
uint32 kindRev;
address elemRegistry;
uint96 _reserved1;
address objectMinter;
uint96 _reserved2;
}