-
Notifications
You must be signed in to change notification settings - Fork 0
/
CarbonProjectsStorage.sol
33 lines (25 loc) · 1.14 KB
/
CarbonProjectsStorage.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// SPDX-FileCopyrightText: 2021 Toucan Labs
//
// SPDX-License-Identifier: UNLICENSED
// If you encounter a vulnerability or an issue, please contact <security@toucan.earth> or visit security.toucan.earth
// Storage contract for CarbonProjects
pragma solidity 0.8.14;
import './CarbonProjectTypes.sol';
/// @dev Separate storage contract to improve upgrade safety
contract CarbonProjectsStorage {
uint128 public projectTokenCounter;
uint128 public totalSupply;
address public contractRegistry;
string public baseURI;
/// @dev maps `tokenId` to `ProjectData` struct
mapping(uint256 => ProjectData) public projectData;
/// @dev uniqueness check for globalUniqueIdentifier strings
/// Example: `'VCS-01468' -> true`
/// Todo: assess if can be deprecated
mapping(string => bool) public projectIds;
/// @dev mapping to identify invalid projectTokenIds
/// Examples: projectokenIds that have been removed or non-existent ones
mapping(uint256 => bool) public validProjectTokenIds;
/// @dev Maps a universal/global project-id like 'VCS-1234' to its `tokenId`
mapping(string => uint256) public pidToTokenId;
}