Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

462 create upgrade script for filestorage #134

Open
wants to merge 19 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,14 @@ node_modules

# Environment variables file
.env

# Custom
cache/
coverage.json
typechain-types/
data/*.json

# OpenZeppelin
.openzeppelin/dev-*.json
.openzeppelin/unknown-*.json
.openzeppelin/.session
314 changes: 314 additions & 0 deletions .openzeppelin/predeployed.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,314 @@
{
"manifestVersion": "3.2",
"admin": {
"address": "0xD3001000000000000000000000000000000000D3"
},
"proxies": [
{
"address": "0xD3002000000000000000000000000000000000d3",
"kind": "transparent"
}
],
"impls": {
"4e24ac3d569790a29e84f7b30c774808d51b5393060beddeffdc9dbefda9c225": {
"address": "0xD3003000000000000000000000000000000000D3",
"layout": {
"solcVersion": "0.8.9",
"storage": [
{
"label": "_initialized",
"offset": 0,
"slot": "0",
"type": "t_uint8",
"contract": "Initializable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62",
"retypedFrom": "bool"
},
{
"label": "_initializing",
"offset": 1,
"slot": "0",
"type": "t_bool",
"contract": "Initializable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67"
},
{
"label": "__gap",
"offset": 0,
"slot": "1",
"type": "t_array(t_uint256)50_storage",
"contract": "ContextUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36"
},
{
"label": "__gap",
"offset": 0,
"slot": "51",
"type": "t_array(t_uint256)50_storage",
"contract": "ERC165Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41"
},
{
"label": "_roles",
"offset": 0,
"slot": "101",
"type": "t_mapping(t_bytes32,t_struct(RoleData)179_storage)",
"contract": "AccessControlUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:61"
},
{
"label": "__gap",
"offset": 0,
"slot": "102",
"type": "t_array(t_uint256)49_storage",
"contract": "AccessControlUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:259"
},
{
"label": "_roleMembers",
"offset": 0,
"slot": "151",
"type": "t_mapping(t_bytes32,t_struct(AddressSet)2176_storage)",
"contract": "AccessControlEnumerableUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol:22"
},
{
"label": "__gap",
"offset": 0,
"slot": "152",
"type": "t_array(t_uint256)49_storage",
"contract": "AccessControlEnumerableUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol:76"
},
{
"label": "reservedStorageSpace",
"offset": 0,
"slot": "201",
"type": "t_mapping(t_address,t_uint256)",
"contract": "FileStorage",
"src": "contracts/FileStorage.sol:58"
},
{
"label": "occupiedStorageSpace",
"offset": 0,
"slot": "202",
"type": "t_mapping(t_address,t_uint256)",
"contract": "FileStorage",
"src": "contracts/FileStorage.sol:59"
},
{
"label": "rootDirectories",
"offset": 0,
"slot": "203",
"type": "t_mapping(t_address,t_struct(Directory)2551_storage)",
"contract": "FileStorage",
"src": "contracts/FileStorage.sol:60"
},
{
"label": "totalReservedSpace",
"offset": 0,
"slot": "204",
"type": "t_uint256",
"contract": "FileStorage",
"src": "contracts/FileStorage.sol:61"
}
],
"types": {
"t_address": {
"label": "address",
"numberOfBytes": "20"
},
"t_array(t_bool)dyn_storage": {
"label": "bool[]",
"numberOfBytes": "32"
},
"t_array(t_bytes32)dyn_storage": {
"label": "bytes32[]",
"numberOfBytes": "32"
},
"t_array(t_struct(ContentInfo)2538_storage)dyn_storage": {
"label": "struct FileStorage.ContentInfo[]",
"numberOfBytes": "32"
},
"t_array(t_uint256)49_storage": {
"label": "uint256[49]",
"numberOfBytes": "1568"
},
"t_array(t_uint256)50_storage": {
"label": "uint256[50]",
"numberOfBytes": "1600"
},
"t_bool": {
"label": "bool",
"numberOfBytes": "1"
},
"t_bytes32": {
"label": "bytes32",
"numberOfBytes": "32"
},
"t_enum(FileStatus)2525": {
"label": "enum FileStorage.FileStatus",
"members": [
"NONEXISTENT",
"UPLOADING",
"COMPLETED"
],
"numberOfBytes": "1"
},
"t_mapping(t_address,t_bool)": {
"label": "mapping(address => bool)",
"numberOfBytes": "32"
},
"t_mapping(t_address,t_struct(Directory)2551_storage)": {
"label": "mapping(address => struct FileStorage.Directory)",
"numberOfBytes": "32"
},
"t_mapping(t_address,t_uint256)": {
"label": "mapping(address => uint256)",
"numberOfBytes": "32"
},
"t_mapping(t_bytes32,t_struct(AddressSet)2176_storage)": {
"label": "mapping(bytes32 => struct EnumerableSetUpgradeable.AddressSet)",
"numberOfBytes": "32"
},
"t_mapping(t_bytes32,t_struct(RoleData)179_storage)": {
"label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)",
"numberOfBytes": "32"
},
"t_mapping(t_bytes32,t_uint256)": {
"label": "mapping(bytes32 => uint256)",
"numberOfBytes": "32"
},
"t_mapping(t_string_memory_ptr,t_uint256)": {
"label": "mapping(string => uint256)",
"numberOfBytes": "32"
},
"t_string_memory_ptr": {
"label": "string",
"numberOfBytes": "32"
},
"t_string_storage": {
"label": "string",
"numberOfBytes": "32"
},
"t_struct(AddressSet)2176_storage": {
"label": "struct EnumerableSetUpgradeable.AddressSet",
"members": [
{
"label": "_inner",
"type": "t_struct(Set)1875_storage",
"offset": 0,
"slot": "0"
}
],
"numberOfBytes": "64"
},
"t_struct(ContentInfo)2538_storage": {
"label": "struct FileStorage.ContentInfo",
"members": [
{
"label": "name",
"type": "t_string_storage",
"offset": 0,
"slot": "0"
},
{
"label": "isFile",
"type": "t_bool",
"offset": 0,
"slot": "1"
},
{
"label": "size",
"type": "t_uint256",
"offset": 0,
"slot": "2"
},
{
"label": "status",
"type": "t_enum(FileStatus)2525",
"offset": 0,
"slot": "3"
},
{
"label": "isChunkUploaded",
"type": "t_array(t_bool)dyn_storage",
"offset": 0,
"slot": "4"
}
],
"numberOfBytes": "160"
},
"t_struct(Directory)2551_storage": {
"label": "struct FileStorage.Directory",
"members": [
{
"label": "contents",
"type": "t_array(t_struct(ContentInfo)2538_storage)dyn_storage",
"offset": 0,
"slot": "0"
},
{
"label": "contentIndexes",
"type": "t_mapping(t_string_memory_ptr,t_uint256)",
"offset": 0,
"slot": "1"
},
{
"label": "directories",
"type": "t_mapping(t_string_memory_ptr,t_uint256)",
"offset": 0,
"slot": "2"
}
],
"numberOfBytes": "96"
},
"t_struct(RoleData)179_storage": {
"label": "struct AccessControlUpgradeable.RoleData",
"members": [
{
"label": "members",
"type": "t_mapping(t_address,t_bool)",
"offset": 0,
"slot": "0"
},
{
"label": "adminRole",
"type": "t_bytes32",
"offset": 0,
"slot": "1"
}
],
"numberOfBytes": "64"
},
"t_struct(Set)1875_storage": {
"label": "struct EnumerableSetUpgradeable.Set",
"members": [
{
"label": "_values",
"type": "t_array(t_bytes32)dyn_storage",
"offset": 0,
"slot": "0"
},
{
"label": "_indexes",
"type": "t_mapping(t_bytes32,t_uint256)",
"offset": 0,
"slot": "1"
}
],
"numberOfBytes": "64"
},
"t_uint256": {
"label": "uint256",
"numberOfBytes": "32"
},
"t_uint8": {
"label": "uint8",
"numberOfBytes": "1"
}
}
}
}
}
}
1 change: 1 addition & 0 deletions DEPLOYED
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.1
Loading