feat: Balances added to StorageLib

This commit is contained in:
donosonaumczuk
2024-02-02 17:49:10 -03:00
parent c6a4ec5d6a
commit ff60a148f5

View File

@@ -8,7 +8,7 @@ library StorageLib {
// uint256 constant NAME_SLOT = 0;
// uint256 constant SYMBOL_SLOT = 1;
uint256 constant TOKEN_DATA_MAPPING_SLOT = 2;
// uint256 constant BALANCES_SLOT = 3;
uint256 constant BALANCES_SLOT = 3;
// uint256 constant TOKEN_APPROVAL_MAPPING_SLOT = 4;
// uint256 constant OPERATOR_APPROVAL_MAPPING_SLOT = 5;
// Slot 6 is deprecated in Lens V2. In V1 it was used for ERC-721 Enumerable's `ownedTokens`.
@@ -114,6 +114,12 @@ library StorageLib {
}
}
function balances() internal pure returns (mapping(address => uint256) storage _balances) {
assembly {
_balances.slot := BALANCES_SLOT
}
}
function blockedStatus(
uint256 blockerProfileId
) internal pure returns (mapping(uint256 => bool) storage _blockedStatus) {