diff --git a/.gitignore b/.gitignore index 1d3120f..f8d24e9 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,5 @@ Thumbs.db ################## cache/ artifacts/ -deployments \ No newline at end of file +deployments +.openzeppelin \ No newline at end of file diff --git a/.openzeppelin/polygon-mumbai.json b/.openzeppelin/polygon-mumbai.json deleted file mode 100644 index 1619c5c..0000000 --- a/.openzeppelin/polygon-mumbai.json +++ /dev/null @@ -1,4637 +0,0 @@ -{ - "manifestVersion": "3.2", - "proxies": [ - { - "address": "0x3C0Fe47104299f7e813b55cc644bA5de17Ba9243", - "txHash": "0xfe7d2f47f442b957c4fd8b49588ee203427dd58e18fc570680e30180feb66920", - "kind": "transparent" - }, - { - "address": "0xbAf091BD704Ed9E3E0FcC24Ac44ade4dC8915BCC", - "txHash": "0xfc2b28f2e4acad2b98f0bb6f5cb193fd1291cbbba1abfe79c71d3b044c00088f", - "kind": "transparent" - }, - { - "address": "0x18E71BBda30777170011090D6f6B28F2A8Bb655E", - "txHash": "0xda115f1de22fd8b3881579a45e028ec7d930fbb9cd2a39fc204dcc4d5e27eb4a", - "kind": "transparent" - }, - { - "address": "0xcd478be4d814b85B48A1F43d0D2fb7f627FeB61b", - "txHash": "0xf01866dc072bc782931d9b83a867e75f9a2b34b10bc9fb5e7a97b2a603ca2c47", - "kind": "transparent" - }, - { - "address": "0xb2EdB4400A3fb9E03f916c42133050Dc0FB3Ca80", - "txHash": "0x2b347858d0aa177b92c9fdd07cff59510f77e58e08f649a9a2c8b6f83a3d3b4f", - "kind": "transparent" - }, - { - "address": "0xe1417AAb82F90CE71e492b468C93c8D52a1aC210", - "txHash": "0x67155d1ae18914fd3d8eb2b231ffc2304ace1b73fe853f004b00d87a9e96adbb", - "kind": "transparent" - }, - { - "address": "0xBd770416a3345F91E4B34576cb804a576fa48EB1", - "txHash": "0xd52f3aa9b990dffd06fb755e204dce2f9856bd7e1e285da5d5bdca39c39fc09e", - "kind": "transparent" - } - ], - "impls": { - "13eabc192d3e2f3f0bc69e41753d6ea1ac1e860fe711cb5b26cc813939d75938": { - "address": "0x80FCdDA8e73986327dDD4a09dE398142e019DdbB", - "txHash": "0xadcbbce36ba7fc97d374326d7c9b43e9603f494bea0502b0da58d7c65c840397", - "layout": { - "solcVersion": "0.8.20", - "storage": [ - { - "label": "_roles", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_bytes32,t_struct(RoleData)275_storage)", - "contract": "AccessControl", - "src": "@openzeppelin/contracts/access/AccessControl.sol:55" - }, - { - "label": "_nextId", - "offset": 0, - "slot": "1", - "type": "t_uint256", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:17" - }, - { - "label": "tokenImplementation", - "offset": 0, - "slot": "2", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:18" - }, - { - "label": "daoImplementation", - "offset": 0, - "slot": "3", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:19" - }, - { - "label": "nft", - "offset": 0, - "slot": "4", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:20" - }, - { - "label": "tbaRegistry", - "offset": 0, - "slot": "5", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:21" - }, - { - "label": "applicationThreshold", - "offset": 0, - "slot": "6", - "type": "t_uint256", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:22" - }, - { - "label": "allTokens", - "offset": 0, - "slot": "7", - "type": "t_array(t_address)dyn_storage", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:24" - }, - { - "label": "allDAOs", - "offset": 0, - "slot": "8", - "type": "t_array(t_address)dyn_storage", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:25" - }, - { - "label": "assetToken", - "offset": 0, - "slot": "9", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:27" - }, - { - "label": "protocolDAO", - "offset": 0, - "slot": "10", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:28" - }, - { - "label": "maturityDuration", - "offset": 0, - "slot": "11", - "type": "t_uint256", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:29" - }, - { - "label": "_applications", - "offset": 0, - "slot": "12", - "type": "t_mapping(t_uint256,t_struct(Application)1956_storage)", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:63" - } - ], - "types": { - "t_bool": { - "label": "bool", - "numberOfBytes": "1" - }, - "t_struct(InitializableStorage)10_storage": { - "label": "struct Initializable.InitializableStorage", - "members": [ - { - "label": "_initialized", - "type": "t_uint64", - "offset": 0, - "slot": "0" - }, - { - "label": "_initializing", - "type": "t_bool", - "offset": 8, - "slot": "0" - } - ], - "numberOfBytes": "32" - }, - "t_uint64": { - "label": "uint64", - "numberOfBytes": "8" - }, - "t_address": { - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_address)dyn_storage": { - "label": "address[]", - "numberOfBytes": "32" - }, - "t_array(t_uint8)dyn_storage": { - "label": "uint8[]", - "numberOfBytes": "32" - }, - "t_bytes32": { - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_enum(ApplicationStatus)1927": { - "label": "enum PersonaFactory.ApplicationStatus", - "members": [ - "Active", - "Executed", - "Withdrawn" - ], - "numberOfBytes": "1" - }, - "t_mapping(t_address,t_bool)": { - "label": "mapping(address => bool)", - "numberOfBytes": "32" - }, - "t_mapping(t_bytes32,t_struct(RoleData)275_storage)": { - "label": "mapping(bytes32 => struct AccessControl.RoleData)", - "numberOfBytes": "32" - }, - "t_mapping(t_uint256,t_struct(Application)1956_storage)": { - "label": "mapping(uint256 => struct PersonaFactory.Application)", - "numberOfBytes": "32" - }, - "t_string_storage": { - "label": "string", - "numberOfBytes": "32" - }, - "t_struct(Application)1956_storage": { - "label": "struct PersonaFactory.Application", - "members": [ - { - "label": "name", - "type": "t_string_storage", - "offset": 0, - "slot": "0" - }, - { - "label": "symbol", - "type": "t_string_storage", - "offset": 0, - "slot": "1" - }, - { - "label": "tokenURI", - "type": "t_string_storage", - "offset": 0, - "slot": "2" - }, - { - "label": "status", - "type": "t_enum(ApplicationStatus)1927", - "offset": 0, - "slot": "3" - }, - { - "label": "withdrawableAmount", - "type": "t_uint256", - "offset": 0, - "slot": "4" - }, - { - "label": "proposer", - "type": "t_address", - "offset": 0, - "slot": "5" - }, - { - "label": "cores", - "type": "t_array(t_uint8)dyn_storage", - "offset": 0, - "slot": "6" - }, - { - "label": "proposalEndBlock", - "type": "t_uint256", - "offset": 0, - "slot": "7" - }, - { - "label": "virtualId", - "type": "t_uint256", - "offset": 0, - "slot": "8" - }, - { - "label": "tbaSalt", - "type": "t_bytes32", - "offset": 0, - "slot": "9" - }, - { - "label": "tbaImplementation", - "type": "t_address", - "offset": 0, - "slot": "10" - }, - { - "label": "daoVotingPeriod", - "type": "t_uint32", - "offset": 20, - "slot": "10" - }, - { - "label": "daoThreshold", - "type": "t_uint256", - "offset": 0, - "slot": "11" - } - ], - "numberOfBytes": "384" - }, - "t_struct(RoleData)275_storage": { - "label": "struct AccessControl.RoleData", - "members": [ - { - "label": "hasRole", - "type": "t_mapping(t_address,t_bool)", - "offset": 0, - "slot": "0" - }, - { - "label": "adminRole", - "type": "t_bytes32", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint32": { - "label": "uint32", - "numberOfBytes": "4" - }, - "t_uint8": { - "label": "uint8", - "numberOfBytes": "1" - } - }, - "namespaces": { - "erc7201:openzeppelin.storage.Initializable": [ - { - "contract": "Initializable", - "label": "_initialized", - "type": "t_uint64", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:69", - "offset": 0, - "slot": "0" - }, - { - "contract": "Initializable", - "label": "_initializing", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:73", - "offset": 8, - "slot": "0" - } - ] - } - } - }, - "a055e7d72e35d5bb55fa3b9b130c1d03a7cfeb2b52a2483587112b624ee7ca36": { - "address": "0x7C4370D83C2fc54FB0733305B92F4C7A76676264", - "txHash": "0xa16013c48f41fe4bfb1ead5d2fe3377aa500dbc4537402a22113edc34dca407b", - "layout": { - "solcVersion": "0.8.20", - "storage": [ - { - "label": "_roles", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_bytes32,t_struct(RoleData)275_storage)", - "contract": "AccessControl", - "src": "@openzeppelin/contracts/access/AccessControl.sol:55" - }, - { - "label": "_nextId", - "offset": 0, - "slot": "1", - "type": "t_uint256", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:17" - }, - { - "label": "tokenImplementation", - "offset": 0, - "slot": "2", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:18" - }, - { - "label": "daoImplementation", - "offset": 0, - "slot": "3", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:19" - }, - { - "label": "nft", - "offset": 0, - "slot": "4", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:20" - }, - { - "label": "tbaRegistry", - "offset": 0, - "slot": "5", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:21" - }, - { - "label": "applicationThreshold", - "offset": 0, - "slot": "6", - "type": "t_uint256", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:22" - }, - { - "label": "allTokens", - "offset": 0, - "slot": "7", - "type": "t_array(t_address)dyn_storage", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:24" - }, - { - "label": "allDAOs", - "offset": 0, - "slot": "8", - "type": "t_array(t_address)dyn_storage", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:25" - }, - { - "label": "assetToken", - "offset": 0, - "slot": "9", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:27" - }, - { - "label": "protocolDAO", - "offset": 0, - "slot": "10", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:28" - }, - { - "label": "maturityDuration", - "offset": 0, - "slot": "11", - "type": "t_uint256", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:29" - }, - { - "label": "_applications", - "offset": 0, - "slot": "12", - "type": "t_mapping(t_uint256,t_struct(Application)1956_storage)", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:63" - } - ], - "types": { - "t_bool": { - "label": "bool", - "numberOfBytes": "1" - }, - "t_struct(InitializableStorage)10_storage": { - "label": "struct Initializable.InitializableStorage", - "members": [ - { - "label": "_initialized", - "type": "t_uint64", - "offset": 0, - "slot": "0" - }, - { - "label": "_initializing", - "type": "t_bool", - "offset": 8, - "slot": "0" - } - ], - "numberOfBytes": "32" - }, - "t_uint64": { - "label": "uint64", - "numberOfBytes": "8" - }, - "t_address": { - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_address)dyn_storage": { - "label": "address[]", - "numberOfBytes": "32" - }, - "t_array(t_uint8)dyn_storage": { - "label": "uint8[]", - "numberOfBytes": "32" - }, - "t_bytes32": { - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_enum(ApplicationStatus)1927": { - "label": "enum PersonaFactory.ApplicationStatus", - "members": [ - "Active", - "Executed", - "Withdrawn" - ], - "numberOfBytes": "1" - }, - "t_mapping(t_address,t_bool)": { - "label": "mapping(address => bool)", - "numberOfBytes": "32" - }, - "t_mapping(t_bytes32,t_struct(RoleData)275_storage)": { - "label": "mapping(bytes32 => struct AccessControl.RoleData)", - "numberOfBytes": "32" - }, - "t_mapping(t_uint256,t_struct(Application)1956_storage)": { - "label": "mapping(uint256 => struct PersonaFactory.Application)", - "numberOfBytes": "32" - }, - "t_string_storage": { - "label": "string", - "numberOfBytes": "32" - }, - "t_struct(Application)1956_storage": { - "label": "struct PersonaFactory.Application", - "members": [ - { - "label": "name", - "type": "t_string_storage", - "offset": 0, - "slot": "0" - }, - { - "label": "symbol", - "type": "t_string_storage", - "offset": 0, - "slot": "1" - }, - { - "label": "tokenURI", - "type": "t_string_storage", - "offset": 0, - "slot": "2" - }, - { - "label": "status", - "type": "t_enum(ApplicationStatus)1927", - "offset": 0, - "slot": "3" - }, - { - "label": "withdrawableAmount", - "type": "t_uint256", - "offset": 0, - "slot": "4" - }, - { - "label": "proposer", - "type": "t_address", - "offset": 0, - "slot": "5" - }, - { - "label": "cores", - "type": "t_array(t_uint8)dyn_storage", - "offset": 0, - "slot": "6" - }, - { - "label": "proposalEndBlock", - "type": "t_uint256", - "offset": 0, - "slot": "7" - }, - { - "label": "virtualId", - "type": "t_uint256", - "offset": 0, - "slot": "8" - }, - { - "label": "tbaSalt", - "type": "t_bytes32", - "offset": 0, - "slot": "9" - }, - { - "label": "tbaImplementation", - "type": "t_address", - "offset": 0, - "slot": "10" - }, - { - "label": "daoVotingPeriod", - "type": "t_uint32", - "offset": 20, - "slot": "10" - }, - { - "label": "daoThreshold", - "type": "t_uint256", - "offset": 0, - "slot": "11" - } - ], - "numberOfBytes": "384" - }, - "t_struct(RoleData)275_storage": { - "label": "struct AccessControl.RoleData", - "members": [ - { - "label": "hasRole", - "type": "t_mapping(t_address,t_bool)", - "offset": 0, - "slot": "0" - }, - { - "label": "adminRole", - "type": "t_bytes32", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint32": { - "label": "uint32", - "numberOfBytes": "4" - }, - "t_uint8": { - "label": "uint8", - "numberOfBytes": "1" - } - }, - "namespaces": { - "erc7201:openzeppelin.storage.Initializable": [ - { - "contract": "Initializable", - "label": "_initialized", - "type": "t_uint64", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:69", - "offset": 0, - "slot": "0" - }, - { - "contract": "Initializable", - "label": "_initializing", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:73", - "offset": 8, - "slot": "0" - } - ] - } - } - }, - "daef23957e20c08ce3422464067371a7f75b31a5d7e162d0396763b56165c3cc": { - "address": "0xb46332D7cffac8a2926280fC96F583765f8848d4", - "txHash": "0xb115f29ce506b91247a79a29b549bff030e4f2ade3ff8d7faef6010ac43905e8", - "layout": { - "solcVersion": "0.8.20", - "storage": [ - { - "label": "_roles", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_bytes32,t_struct(RoleData)275_storage)", - "contract": "AccessControl", - "src": "@openzeppelin/contracts/access/AccessControl.sol:55" - }, - { - "label": "_nextId", - "offset": 0, - "slot": "1", - "type": "t_uint256", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:17" - }, - { - "label": "tokenImplementation", - "offset": 0, - "slot": "2", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:18" - }, - { - "label": "daoImplementation", - "offset": 0, - "slot": "3", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:19" - }, - { - "label": "nft", - "offset": 0, - "slot": "4", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:20" - }, - { - "label": "tbaRegistry", - "offset": 0, - "slot": "5", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:21" - }, - { - "label": "applicationThreshold", - "offset": 0, - "slot": "6", - "type": "t_uint256", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:22" - }, - { - "label": "allTokens", - "offset": 0, - "slot": "7", - "type": "t_array(t_address)dyn_storage", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:24" - }, - { - "label": "allDAOs", - "offset": 0, - "slot": "8", - "type": "t_array(t_address)dyn_storage", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:25" - }, - { - "label": "assetToken", - "offset": 0, - "slot": "9", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:27" - }, - { - "label": "protocolDAO", - "offset": 0, - "slot": "10", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:28" - }, - { - "label": "maturityDuration", - "offset": 0, - "slot": "11", - "type": "t_uint256", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:29" - }, - { - "label": "_applications", - "offset": 0, - "slot": "12", - "type": "t_mapping(t_uint256,t_struct(Application)1956_storage)", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:63" - }, - { - "label": "gov", - "offset": 0, - "slot": "13", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:65" - } - ], - "types": { - "t_bool": { - "label": "bool", - "numberOfBytes": "1" - }, - "t_struct(InitializableStorage)10_storage": { - "label": "struct Initializable.InitializableStorage", - "members": [ - { - "label": "_initialized", - "type": "t_uint64", - "offset": 0, - "slot": "0" - }, - { - "label": "_initializing", - "type": "t_bool", - "offset": 8, - "slot": "0" - } - ], - "numberOfBytes": "32" - }, - "t_uint64": { - "label": "uint64", - "numberOfBytes": "8" - }, - "t_address": { - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_address)dyn_storage": { - "label": "address[]", - "numberOfBytes": "32" - }, - "t_array(t_uint8)dyn_storage": { - "label": "uint8[]", - "numberOfBytes": "32" - }, - "t_bytes32": { - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_enum(ApplicationStatus)1927": { - "label": "enum PersonaFactory.ApplicationStatus", - "members": [ - "Active", - "Executed", - "Withdrawn" - ], - "numberOfBytes": "1" - }, - "t_mapping(t_address,t_bool)": { - "label": "mapping(address => bool)", - "numberOfBytes": "32" - }, - "t_mapping(t_bytes32,t_struct(RoleData)275_storage)": { - "label": "mapping(bytes32 => struct AccessControl.RoleData)", - "numberOfBytes": "32" - }, - "t_mapping(t_uint256,t_struct(Application)1956_storage)": { - "label": "mapping(uint256 => struct PersonaFactory.Application)", - "numberOfBytes": "32" - }, - "t_string_storage": { - "label": "string", - "numberOfBytes": "32" - }, - "t_struct(Application)1956_storage": { - "label": "struct PersonaFactory.Application", - "members": [ - { - "label": "name", - "type": "t_string_storage", - "offset": 0, - "slot": "0" - }, - { - "label": "symbol", - "type": "t_string_storage", - "offset": 0, - "slot": "1" - }, - { - "label": "tokenURI", - "type": "t_string_storage", - "offset": 0, - "slot": "2" - }, - { - "label": "status", - "type": "t_enum(ApplicationStatus)1927", - "offset": 0, - "slot": "3" - }, - { - "label": "withdrawableAmount", - "type": "t_uint256", - "offset": 0, - "slot": "4" - }, - { - "label": "proposer", - "type": "t_address", - "offset": 0, - "slot": "5" - }, - { - "label": "cores", - "type": "t_array(t_uint8)dyn_storage", - "offset": 0, - "slot": "6" - }, - { - "label": "proposalEndBlock", - "type": "t_uint256", - "offset": 0, - "slot": "7" - }, - { - "label": "virtualId", - "type": "t_uint256", - "offset": 0, - "slot": "8" - }, - { - "label": "tbaSalt", - "type": "t_bytes32", - "offset": 0, - "slot": "9" - }, - { - "label": "tbaImplementation", - "type": "t_address", - "offset": 0, - "slot": "10" - }, - { - "label": "daoVotingPeriod", - "type": "t_uint32", - "offset": 20, - "slot": "10" - }, - { - "label": "daoThreshold", - "type": "t_uint256", - "offset": 0, - "slot": "11" - } - ], - "numberOfBytes": "384" - }, - "t_struct(RoleData)275_storage": { - "label": "struct AccessControl.RoleData", - "members": [ - { - "label": "hasRole", - "type": "t_mapping(t_address,t_bool)", - "offset": 0, - "slot": "0" - }, - { - "label": "adminRole", - "type": "t_bytes32", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint32": { - "label": "uint32", - "numberOfBytes": "4" - }, - "t_uint8": { - "label": "uint8", - "numberOfBytes": "1" - } - }, - "namespaces": { - "erc7201:openzeppelin.storage.Initializable": [ - { - "contract": "Initializable", - "label": "_initialized", - "type": "t_uint64", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:69", - "offset": 0, - "slot": "0" - }, - { - "contract": "Initializable", - "label": "_initializing", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:73", - "offset": 8, - "slot": "0" - } - ] - } - } - }, - "69e1ea770e1f09e4d699a5b7276ddb84a9fcdc0b7703ab04a0e3e4bf0aaf2bc6": { - "address": "0x365D6F8AE67D4231dFcC5c21dcc72d8Bf96c329c", - "txHash": "0x33bd7c78be13708679b322eea468169a91c0eae8f346f8578ab3c760066c0638", - "layout": { - "solcVersion": "0.8.20", - "storage": [ - { - "label": "_roles", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_bytes32,t_struct(RoleData)5195_storage)", - "contract": "AccessControl", - "src": "@openzeppelin/contracts/access/AccessControl.sol:55" - }, - { - "label": "_nextId", - "offset": 0, - "slot": "1", - "type": "t_uint256", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:17" - }, - { - "label": "tokenImplementation", - "offset": 0, - "slot": "2", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:18" - }, - { - "label": "daoImplementation", - "offset": 0, - "slot": "3", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:19" - }, - { - "label": "nft", - "offset": 0, - "slot": "4", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:20" - }, - { - "label": "tbaRegistry", - "offset": 0, - "slot": "5", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:21" - }, - { - "label": "applicationThreshold", - "offset": 0, - "slot": "6", - "type": "t_uint256", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:22" - }, - { - "label": "allTokens", - "offset": 0, - "slot": "7", - "type": "t_array(t_address)dyn_storage", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:24" - }, - { - "label": "allDAOs", - "offset": 0, - "slot": "8", - "type": "t_array(t_address)dyn_storage", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:25" - }, - { - "label": "assetToken", - "offset": 0, - "slot": "9", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:27" - }, - { - "label": "protocolDAO", - "offset": 0, - "slot": "10", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:28" - }, - { - "label": "maturityDuration", - "offset": 0, - "slot": "11", - "type": "t_uint256", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:29" - }, - { - "label": "_applications", - "offset": 0, - "slot": "12", - "type": "t_mapping(t_uint256,t_struct(Application)26390_storage)", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:63" - }, - { - "label": "gov", - "offset": 0, - "slot": "13", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:65" - } - ], - "types": { - "t_bool": { - "label": "bool", - "numberOfBytes": "1" - }, - "t_struct(InitializableStorage)607_storage": { - "label": "struct Initializable.InitializableStorage", - "members": [ - { - "label": "_initialized", - "type": "t_uint64", - "offset": 0, - "slot": "0" - }, - { - "label": "_initializing", - "type": "t_bool", - "offset": 8, - "slot": "0" - } - ], - "numberOfBytes": "32" - }, - "t_uint64": { - "label": "uint64", - "numberOfBytes": "8" - }, - "t_address": { - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_address)dyn_storage": { - "label": "address[]", - "numberOfBytes": "32" - }, - "t_array(t_uint8)dyn_storage": { - "label": "uint8[]", - "numberOfBytes": "32" - }, - "t_bytes32": { - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_enum(ApplicationStatus)26361": { - "label": "enum PersonaFactory.ApplicationStatus", - "members": [ - "Active", - "Executed", - "Withdrawn" - ], - "numberOfBytes": "1" - }, - "t_mapping(t_address,t_bool)": { - "label": "mapping(address => bool)", - "numberOfBytes": "32" - }, - "t_mapping(t_bytes32,t_struct(RoleData)5195_storage)": { - "label": "mapping(bytes32 => struct AccessControl.RoleData)", - "numberOfBytes": "32" - }, - "t_mapping(t_uint256,t_struct(Application)26390_storage)": { - "label": "mapping(uint256 => struct PersonaFactory.Application)", - "numberOfBytes": "32" - }, - "t_string_storage": { - "label": "string", - "numberOfBytes": "32" - }, - "t_struct(Application)26390_storage": { - "label": "struct PersonaFactory.Application", - "members": [ - { - "label": "name", - "type": "t_string_storage", - "offset": 0, - "slot": "0" - }, - { - "label": "symbol", - "type": "t_string_storage", - "offset": 0, - "slot": "1" - }, - { - "label": "tokenURI", - "type": "t_string_storage", - "offset": 0, - "slot": "2" - }, - { - "label": "status", - "type": "t_enum(ApplicationStatus)26361", - "offset": 0, - "slot": "3" - }, - { - "label": "withdrawableAmount", - "type": "t_uint256", - "offset": 0, - "slot": "4" - }, - { - "label": "proposer", - "type": "t_address", - "offset": 0, - "slot": "5" - }, - { - "label": "cores", - "type": "t_array(t_uint8)dyn_storage", - "offset": 0, - "slot": "6" - }, - { - "label": "proposalEndBlock", - "type": "t_uint256", - "offset": 0, - "slot": "7" - }, - { - "label": "virtualId", - "type": "t_uint256", - "offset": 0, - "slot": "8" - }, - { - "label": "tbaSalt", - "type": "t_bytes32", - "offset": 0, - "slot": "9" - }, - { - "label": "tbaImplementation", - "type": "t_address", - "offset": 0, - "slot": "10" - }, - { - "label": "daoVotingPeriod", - "type": "t_uint32", - "offset": 20, - "slot": "10" - }, - { - "label": "daoThreshold", - "type": "t_uint256", - "offset": 0, - "slot": "11" - } - ], - "numberOfBytes": "384" - }, - "t_struct(RoleData)5195_storage": { - "label": "struct AccessControl.RoleData", - "members": [ - { - "label": "hasRole", - "type": "t_mapping(t_address,t_bool)", - "offset": 0, - "slot": "0" - }, - { - "label": "adminRole", - "type": "t_bytes32", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint32": { - "label": "uint32", - "numberOfBytes": "4" - }, - "t_uint8": { - "label": "uint8", - "numberOfBytes": "1" - } - }, - "namespaces": { - "erc7201:openzeppelin.storage.Initializable": [ - { - "contract": "Initializable", - "label": "_initialized", - "type": "t_uint64", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:69", - "offset": 0, - "slot": "0" - }, - { - "contract": "Initializable", - "label": "_initializing", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:73", - "offset": 8, - "slot": "0" - } - ] - } - } - }, - "680767682c3e241b54e42b552269eb62d89e987b84ae8af2ec7af901c2877b52": { - "address": "0x1FE54C5bf5bc1BcdE6DD3A634Eec167546baE68e", - "txHash": "0xc5087cdce0d9cbf5b3d152432f7089db5267bd999c960de6d32d3dfec0f06f19", - "layout": { - "solcVersion": "0.8.20", - "storage": [ - { - "label": "_roles", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_bytes32,t_struct(RoleData)275_storage)", - "contract": "AccessControl", - "src": "@openzeppelin/contracts/access/AccessControl.sol:55" - }, - { - "label": "_nextId", - "offset": 0, - "slot": "1", - "type": "t_uint256", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:17" - }, - { - "label": "tokenImplementation", - "offset": 0, - "slot": "2", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:18" - }, - { - "label": "daoImplementation", - "offset": 0, - "slot": "3", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:19" - }, - { - "label": "nft", - "offset": 0, - "slot": "4", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:20" - }, - { - "label": "tbaRegistry", - "offset": 0, - "slot": "5", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:21" - }, - { - "label": "applicationThreshold", - "offset": 0, - "slot": "6", - "type": "t_uint256", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:22" - }, - { - "label": "allTokens", - "offset": 0, - "slot": "7", - "type": "t_array(t_address)dyn_storage", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:24" - }, - { - "label": "allDAOs", - "offset": 0, - "slot": "8", - "type": "t_array(t_address)dyn_storage", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:25" - }, - { - "label": "assetToken", - "offset": 0, - "slot": "9", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:27" - }, - { - "label": "protocolDAO", - "offset": 0, - "slot": "10", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:28" - }, - { - "label": "maturityDuration", - "offset": 0, - "slot": "11", - "type": "t_uint256", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:29" - }, - { - "label": "_applications", - "offset": 0, - "slot": "12", - "type": "t_mapping(t_uint256,t_struct(Application)1956_storage)", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:63" - }, - { - "label": "gov", - "offset": 0, - "slot": "13", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:65" - } - ], - "types": { - "t_bool": { - "label": "bool", - "numberOfBytes": "1" - }, - "t_struct(InitializableStorage)10_storage": { - "label": "struct Initializable.InitializableStorage", - "members": [ - { - "label": "_initialized", - "type": "t_uint64", - "offset": 0, - "slot": "0" - }, - { - "label": "_initializing", - "type": "t_bool", - "offset": 8, - "slot": "0" - } - ], - "numberOfBytes": "32" - }, - "t_uint64": { - "label": "uint64", - "numberOfBytes": "8" - }, - "t_address": { - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_address)dyn_storage": { - "label": "address[]", - "numberOfBytes": "32" - }, - "t_array(t_uint8)dyn_storage": { - "label": "uint8[]", - "numberOfBytes": "32" - }, - "t_bytes32": { - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_enum(ApplicationStatus)1927": { - "label": "enum PersonaFactory.ApplicationStatus", - "members": [ - "Active", - "Executed", - "Withdrawn" - ], - "numberOfBytes": "1" - }, - "t_mapping(t_address,t_bool)": { - "label": "mapping(address => bool)", - "numberOfBytes": "32" - }, - "t_mapping(t_bytes32,t_struct(RoleData)275_storage)": { - "label": "mapping(bytes32 => struct AccessControl.RoleData)", - "numberOfBytes": "32" - }, - "t_mapping(t_uint256,t_struct(Application)1956_storage)": { - "label": "mapping(uint256 => struct PersonaFactory.Application)", - "numberOfBytes": "32" - }, - "t_string_storage": { - "label": "string", - "numberOfBytes": "32" - }, - "t_struct(Application)1956_storage": { - "label": "struct PersonaFactory.Application", - "members": [ - { - "label": "name", - "type": "t_string_storage", - "offset": 0, - "slot": "0" - }, - { - "label": "symbol", - "type": "t_string_storage", - "offset": 0, - "slot": "1" - }, - { - "label": "tokenURI", - "type": "t_string_storage", - "offset": 0, - "slot": "2" - }, - { - "label": "status", - "type": "t_enum(ApplicationStatus)1927", - "offset": 0, - "slot": "3" - }, - { - "label": "withdrawableAmount", - "type": "t_uint256", - "offset": 0, - "slot": "4" - }, - { - "label": "proposer", - "type": "t_address", - "offset": 0, - "slot": "5" - }, - { - "label": "cores", - "type": "t_array(t_uint8)dyn_storage", - "offset": 0, - "slot": "6" - }, - { - "label": "proposalEndBlock", - "type": "t_uint256", - "offset": 0, - "slot": "7" - }, - { - "label": "virtualId", - "type": "t_uint256", - "offset": 0, - "slot": "8" - }, - { - "label": "tbaSalt", - "type": "t_bytes32", - "offset": 0, - "slot": "9" - }, - { - "label": "tbaImplementation", - "type": "t_address", - "offset": 0, - "slot": "10" - }, - { - "label": "daoVotingPeriod", - "type": "t_uint32", - "offset": 20, - "slot": "10" - }, - { - "label": "daoThreshold", - "type": "t_uint256", - "offset": 0, - "slot": "11" - } - ], - "numberOfBytes": "384" - }, - "t_struct(RoleData)275_storage": { - "label": "struct AccessControl.RoleData", - "members": [ - { - "label": "hasRole", - "type": "t_mapping(t_address,t_bool)", - "offset": 0, - "slot": "0" - }, - { - "label": "adminRole", - "type": "t_bytes32", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint32": { - "label": "uint32", - "numberOfBytes": "4" - }, - "t_uint8": { - "label": "uint8", - "numberOfBytes": "1" - } - }, - "namespaces": { - "erc7201:openzeppelin.storage.Initializable": [ - { - "contract": "Initializable", - "label": "_initialized", - "type": "t_uint64", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:69", - "offset": 0, - "slot": "0" - }, - { - "contract": "Initializable", - "label": "_initializing", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:73", - "offset": 8, - "slot": "0" - } - ] - } - } - }, - "fc3e891bd53267631cff94657d116d17b73a123b457c1eb0ff700df7b7005782": { - "address": "0xEAd3375DDC1cCCeD917b673B9319Ba2200B244FE", - "txHash": "0x8a8f28d4a99de1565b727a52935869feaf342f3395a96fd930467326ddd415b9", - "layout": { - "solcVersion": "0.8.20", - "storage": [ - { - "label": "_roles", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_bytes32,t_struct(RoleData)275_storage)", - "contract": "AccessControl", - "src": "@openzeppelin/contracts/access/AccessControl.sol:55" - }, - { - "label": "_nextRewardId", - "offset": 0, - "slot": "1", - "type": "t_uint48", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:30" - }, - { - "label": "rewardToken", - "offset": 6, - "slot": "1", - "type": "t_address", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:34" - }, - { - "label": "personaNft", - "offset": 0, - "slot": "2", - "type": "t_address", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:35" - }, - { - "label": "contributionNft", - "offset": 0, - "slot": "3", - "type": "t_address", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:36" - }, - { - "label": "serviceNft", - "offset": 0, - "slot": "4", - "type": "t_address", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:37" - }, - { - "label": "virtualIPNft", - "offset": 0, - "slot": "5", - "type": "t_address", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:38" - }, - { - "label": "_mainRewards", - "offset": 0, - "slot": "6", - "type": "t_array(t_struct(MainReward)4393_storage)dyn_storage", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:40" - }, - { - "label": "protocolRewards", - "offset": 0, - "slot": "7", - "type": "t_uint256", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:41" - }, - { - "label": "stakeThreshold", - "offset": 0, - "slot": "8", - "type": "t_uint256", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:42" - }, - { - "label": "parentShares", - "offset": 0, - "slot": "9", - "type": "t_uint16", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:43" - }, - { - "label": "_rewardSettings", - "offset": 0, - "slot": "10", - "type": "t_struct(Trace)7125_storage", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:45" - }, - { - "label": "_claimedStakerRewards", - "offset": 0, - "slot": "11", - "type": "t_mapping(t_address,t_mapping(t_uint256,t_struct(Claim)4417_storage))", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:47" - }, - { - "label": "_claimedValidatorRewards", - "offset": 0, - "slot": "12", - "type": "t_mapping(t_address,t_mapping(t_uint256,t_struct(Claim)4417_storage))", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:49" - }, - { - "label": "_rewards", - "offset": 0, - "slot": "13", - "type": "t_mapping(t_uint256,t_array(t_struct(Reward)4412_storage)dyn_storage)", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:51" - }, - { - "label": "_validatorScores", - "offset": 0, - "slot": "14", - "type": "t_mapping(t_address,t_mapping(t_uint48,t_uint256))", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:52" - }, - { - "label": "_modelRewards", - "offset": 0, - "slot": "15", - "type": "t_mapping(t_uint256,t_struct(ModelReward)4431_storage)", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:54" - }, - { - "label": "_datasetClaims", - "offset": 0, - "slot": "16", - "type": "t_mapping(t_uint256,t_struct(Claim)4417_storage)", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:55" - }, - { - "label": "_ipRewards", - "offset": 0, - "slot": "17", - "type": "t_mapping(t_uint256,t_struct(IPReward)4422_storage)", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:59" - } - ], - "types": { - "t_bool": { - "label": "bool", - "numberOfBytes": "1" - }, - "t_struct(InitializableStorage)10_storage": { - "label": "struct Initializable.InitializableStorage", - "members": [ - { - "label": "_initialized", - "type": "t_uint64", - "offset": 0, - "slot": "0" - }, - { - "label": "_initializing", - "type": "t_bool", - "offset": 8, - "slot": "0" - } - ], - "numberOfBytes": "32" - }, - "t_uint64": { - "label": "uint64", - "numberOfBytes": "8" - }, - "t_address": { - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_struct(Checkpoint)7148_storage)dyn_storage": { - "label": "struct RewardSettingsCheckpoints.Checkpoint[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(MainReward)4393_storage)dyn_storage": { - "label": "struct IPersonaReward.MainReward[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Reward)4412_storage)dyn_storage": { - "label": "struct IPersonaReward.Reward[]", - "numberOfBytes": "32" - }, - "t_bytes32": { - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_bool)": { - "label": "mapping(address => bool)", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_mapping(t_uint256,t_struct(Claim)4417_storage))": { - "label": "mapping(address => mapping(uint256 => struct IPersonaReward.Claim))", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_mapping(t_uint48,t_uint256))": { - "label": "mapping(address => mapping(uint48 => uint256))", - "numberOfBytes": "32" - }, - "t_mapping(t_bytes32,t_struct(RoleData)275_storage)": { - "label": "mapping(bytes32 => struct AccessControl.RoleData)", - "numberOfBytes": "32" - }, - "t_mapping(t_uint256,t_array(t_struct(Reward)4412_storage)dyn_storage)": { - "label": "mapping(uint256 => struct IPersonaReward.Reward[])", - "numberOfBytes": "32" - }, - "t_mapping(t_uint256,t_struct(Claim)4417_storage)": { - "label": "mapping(uint256 => struct IPersonaReward.Claim)", - "numberOfBytes": "32" - }, - "t_mapping(t_uint256,t_struct(IPReward)4422_storage)": { - "label": "mapping(uint256 => struct IPersonaReward.IPReward)", - "numberOfBytes": "32" - }, - "t_mapping(t_uint256,t_struct(ModelReward)4431_storage)": { - "label": "mapping(uint256 => struct IPersonaReward.ModelReward)", - "numberOfBytes": "32" - }, - "t_mapping(t_uint48,t_uint256)": { - "label": "mapping(uint48 => uint256)", - "numberOfBytes": "32" - }, - "t_struct(Checkpoint)7148_storage": { - "label": "struct RewardSettingsCheckpoints.Checkpoint", - "members": [ - { - "label": "_key", - "type": "t_uint32", - "offset": 0, - "slot": "0" - }, - { - "label": "_value", - "type": "t_struct(RewardSettings)7142_storage", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Claim)4417_storage": { - "label": "struct IPersonaReward.Claim", - "members": [ - { - "label": "totalClaimed", - "type": "t_uint256", - "offset": 0, - "slot": "0" - }, - { - "label": "rewardCount", - "type": "t_uint32", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_struct(IPReward)4422_storage": { - "label": "struct IPersonaReward.IPReward", - "members": [ - { - "label": "amount", - "type": "t_uint256", - "offset": 0, - "slot": "0" - }, - { - "label": "totalClaimed", - "type": "t_uint256", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_struct(MainReward)4393_storage": { - "label": "struct IPersonaReward.MainReward", - "members": [ - { - "label": "blockNumber", - "type": "t_uint32", - "offset": 0, - "slot": "0" - }, - { - "label": "amount", - "type": "t_uint256", - "offset": 0, - "slot": "1" - }, - { - "label": "personaCount", - "type": "t_uint256", - "offset": 0, - "slot": "2" - }, - { - "label": "totalStaked", - "type": "t_uint256", - "offset": 0, - "slot": "3" - } - ], - "numberOfBytes": "128" - }, - "t_struct(ModelReward)4431_storage": { - "label": "struct IPersonaReward.ModelReward", - "members": [ - { - "label": "amount", - "type": "t_uint256", - "offset": 0, - "slot": "0" - }, - { - "label": "parentAmount", - "type": "t_uint256", - "offset": 0, - "slot": "1" - }, - { - "label": "totalClaimed", - "type": "t_uint256", - "offset": 0, - "slot": "2" - }, - { - "label": "totalClaimedParent", - "type": "t_uint256", - "offset": 0, - "slot": "3" - } - ], - "numberOfBytes": "128" - }, - "t_struct(Reward)4412_storage": { - "label": "struct IPersonaReward.Reward", - "members": [ - { - "label": "id", - "type": "t_uint48", - "offset": 0, - "slot": "0" - }, - { - "label": "mainIndex", - "type": "t_uint32", - "offset": 6, - "slot": "0" - }, - { - "label": "totalStaked", - "type": "t_uint256", - "offset": 0, - "slot": "1" - }, - { - "label": "totalVScore", - "type": "t_uint256", - "offset": 0, - "slot": "2" - }, - { - "label": "totalDatasets", - "type": "t_uint256", - "offset": 0, - "slot": "3" - }, - { - "label": "validatorAmount", - "type": "t_uint256", - "offset": 0, - "slot": "4" - }, - { - "label": "modelAmount", - "type": "t_uint256", - "offset": 0, - "slot": "5" - }, - { - "label": "datasetAmount", - "type": "t_uint256", - "offset": 0, - "slot": "6" - }, - { - "label": "ipAmount", - "type": "t_uint256", - "offset": 0, - "slot": "7" - } - ], - "numberOfBytes": "256" - }, - "t_struct(RewardSettings)7142_storage": { - "label": "struct RewardSettingsCheckpoints.RewardSettings", - "members": [ - { - "label": "uptimeWeight", - "type": "t_uint16", - "offset": 0, - "slot": "0" - }, - { - "label": "stakeWeight", - "type": "t_uint16", - "offset": 2, - "slot": "0" - }, - { - "label": "protocolShares", - "type": "t_uint16", - "offset": 4, - "slot": "0" - }, - { - "label": "contributorShares", - "type": "t_uint16", - "offset": 6, - "slot": "0" - }, - { - "label": "stakerShares", - "type": "t_uint16", - "offset": 8, - "slot": "0" - }, - { - "label": "datasetShares", - "type": "t_uint16", - "offset": 10, - "slot": "0" - }, - { - "label": "impactShares", - "type": "t_uint16", - "offset": 12, - "slot": "0" - }, - { - "label": "ipShares", - "type": "t_uint16", - "offset": 14, - "slot": "0" - } - ], - "numberOfBytes": "32" - }, - "t_struct(RoleData)275_storage": { - "label": "struct AccessControl.RoleData", - "members": [ - { - "label": "hasRole", - "type": "t_mapping(t_address,t_bool)", - "offset": 0, - "slot": "0" - }, - { - "label": "adminRole", - "type": "t_bytes32", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Trace)7125_storage": { - "label": "struct RewardSettingsCheckpoints.Trace", - "members": [ - { - "label": "_checkpoints", - "type": "t_array(t_struct(Checkpoint)7148_storage)dyn_storage", - "offset": 0, - "slot": "0" - } - ], - "numberOfBytes": "32" - }, - "t_uint16": { - "label": "uint16", - "numberOfBytes": "2" - }, - "t_uint256": { - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint32": { - "label": "uint32", - "numberOfBytes": "4" - }, - "t_uint48": { - "label": "uint48", - "numberOfBytes": "6" - } - }, - "namespaces": { - "erc7201:openzeppelin.storage.Initializable": [ - { - "contract": "Initializable", - "label": "_initialized", - "type": "t_uint64", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:69", - "offset": 0, - "slot": "0" - }, - { - "contract": "Initializable", - "label": "_initializing", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:73", - "offset": 8, - "slot": "0" - } - ] - } - } - }, - "19840f6beb989168d7c34d602667950bff4dfcd724c3165b79d5a0611ef1b8a2": { - "address": "0x8BAD37f6b53B176514Bc267eF7cd44bcE77Bf418", - "txHash": "0x8d229fffdfd37902d17b8ea4069c18e112a0252c00945a132c2d641afbf1ca19", - "layout": { - "solcVersion": "0.8.20", - "storage": [ - { - "label": "_roles", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_bytes32,t_struct(RoleData)275_storage)", - "contract": "AccessControl", - "src": "@openzeppelin/contracts/access/AccessControl.sol:55" - }, - { - "label": "_nextRewardId", - "offset": 0, - "slot": "1", - "type": "t_uint48", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:30" - }, - { - "label": "rewardToken", - "offset": 6, - "slot": "1", - "type": "t_address", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:34" - }, - { - "label": "personaNft", - "offset": 0, - "slot": "2", - "type": "t_address", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:35" - }, - { - "label": "contributionNft", - "offset": 0, - "slot": "3", - "type": "t_address", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:36" - }, - { - "label": "serviceNft", - "offset": 0, - "slot": "4", - "type": "t_address", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:37" - }, - { - "label": "virtualIPNft", - "offset": 0, - "slot": "5", - "type": "t_address", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:38" - }, - { - "label": "_mainRewards", - "offset": 0, - "slot": "6", - "type": "t_array(t_struct(MainReward)4393_storage)dyn_storage", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:40" - }, - { - "label": "protocolRewards", - "offset": 0, - "slot": "7", - "type": "t_uint256", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:41" - }, - { - "label": "stakeThreshold", - "offset": 0, - "slot": "8", - "type": "t_uint256", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:42" - }, - { - "label": "parentShares", - "offset": 0, - "slot": "9", - "type": "t_uint16", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:43" - }, - { - "label": "_rewardSettings", - "offset": 0, - "slot": "10", - "type": "t_struct(Trace)7061_storage", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:45" - }, - { - "label": "_claimedStakerRewards", - "offset": 0, - "slot": "11", - "type": "t_mapping(t_address,t_mapping(t_uint256,t_struct(Claim)4417_storage))", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:47" - }, - { - "label": "_claimedValidatorRewards", - "offset": 0, - "slot": "12", - "type": "t_mapping(t_address,t_mapping(t_uint256,t_struct(Claim)4417_storage))", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:49" - }, - { - "label": "_rewards", - "offset": 0, - "slot": "13", - "type": "t_mapping(t_uint256,t_array(t_struct(Reward)4412_storage)dyn_storage)", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:51" - }, - { - "label": "_validatorScores", - "offset": 0, - "slot": "14", - "type": "t_mapping(t_address,t_mapping(t_uint48,t_uint256))", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:52" - }, - { - "label": "_modelRewards", - "offset": 0, - "slot": "15", - "type": "t_mapping(t_uint256,t_struct(ModelReward)4431_storage)", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:54" - }, - { - "label": "_datasetClaims", - "offset": 0, - "slot": "16", - "type": "t_mapping(t_uint256,t_struct(Claim)4417_storage)", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:55" - }, - { - "label": "_ipRewards", - "offset": 0, - "slot": "17", - "type": "t_mapping(t_uint256,t_struct(IPReward)4422_storage)", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:59" - } - ], - "types": { - "t_bool": { - "label": "bool", - "numberOfBytes": "1" - }, - "t_struct(InitializableStorage)10_storage": { - "label": "struct Initializable.InitializableStorage", - "members": [ - { - "label": "_initialized", - "type": "t_uint64", - "offset": 0, - "slot": "0" - }, - { - "label": "_initializing", - "type": "t_bool", - "offset": 8, - "slot": "0" - } - ], - "numberOfBytes": "32" - }, - "t_uint64": { - "label": "uint64", - "numberOfBytes": "8" - }, - "t_address": { - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_struct(Checkpoint)7084_storage)dyn_storage": { - "label": "struct RewardSettingsCheckpoints.Checkpoint[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(MainReward)4393_storage)dyn_storage": { - "label": "struct IPersonaReward.MainReward[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Reward)4412_storage)dyn_storage": { - "label": "struct IPersonaReward.Reward[]", - "numberOfBytes": "32" - }, - "t_bytes32": { - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_bool)": { - "label": "mapping(address => bool)", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_mapping(t_uint256,t_struct(Claim)4417_storage))": { - "label": "mapping(address => mapping(uint256 => struct IPersonaReward.Claim))", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_mapping(t_uint48,t_uint256))": { - "label": "mapping(address => mapping(uint48 => uint256))", - "numberOfBytes": "32" - }, - "t_mapping(t_bytes32,t_struct(RoleData)275_storage)": { - "label": "mapping(bytes32 => struct AccessControl.RoleData)", - "numberOfBytes": "32" - }, - "t_mapping(t_uint256,t_array(t_struct(Reward)4412_storage)dyn_storage)": { - "label": "mapping(uint256 => struct IPersonaReward.Reward[])", - "numberOfBytes": "32" - }, - "t_mapping(t_uint256,t_struct(Claim)4417_storage)": { - "label": "mapping(uint256 => struct IPersonaReward.Claim)", - "numberOfBytes": "32" - }, - "t_mapping(t_uint256,t_struct(IPReward)4422_storage)": { - "label": "mapping(uint256 => struct IPersonaReward.IPReward)", - "numberOfBytes": "32" - }, - "t_mapping(t_uint256,t_struct(ModelReward)4431_storage)": { - "label": "mapping(uint256 => struct IPersonaReward.ModelReward)", - "numberOfBytes": "32" - }, - "t_mapping(t_uint48,t_uint256)": { - "label": "mapping(uint48 => uint256)", - "numberOfBytes": "32" - }, - "t_struct(Checkpoint)7084_storage": { - "label": "struct RewardSettingsCheckpoints.Checkpoint", - "members": [ - { - "label": "_key", - "type": "t_uint32", - "offset": 0, - "slot": "0" - }, - { - "label": "_value", - "type": "t_struct(RewardSettings)7078_storage", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Claim)4417_storage": { - "label": "struct IPersonaReward.Claim", - "members": [ - { - "label": "totalClaimed", - "type": "t_uint256", - "offset": 0, - "slot": "0" - }, - { - "label": "rewardCount", - "type": "t_uint32", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_struct(IPReward)4422_storage": { - "label": "struct IPersonaReward.IPReward", - "members": [ - { - "label": "amount", - "type": "t_uint256", - "offset": 0, - "slot": "0" - }, - { - "label": "totalClaimed", - "type": "t_uint256", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_struct(MainReward)4393_storage": { - "label": "struct IPersonaReward.MainReward", - "members": [ - { - "label": "blockNumber", - "type": "t_uint32", - "offset": 0, - "slot": "0" - }, - { - "label": "amount", - "type": "t_uint256", - "offset": 0, - "slot": "1" - }, - { - "label": "personaCount", - "type": "t_uint256", - "offset": 0, - "slot": "2" - }, - { - "label": "totalStaked", - "type": "t_uint256", - "offset": 0, - "slot": "3" - } - ], - "numberOfBytes": "128" - }, - "t_struct(ModelReward)4431_storage": { - "label": "struct IPersonaReward.ModelReward", - "members": [ - { - "label": "amount", - "type": "t_uint256", - "offset": 0, - "slot": "0" - }, - { - "label": "parentAmount", - "type": "t_uint256", - "offset": 0, - "slot": "1" - }, - { - "label": "totalClaimed", - "type": "t_uint256", - "offset": 0, - "slot": "2" - }, - { - "label": "totalClaimedParent", - "type": "t_uint256", - "offset": 0, - "slot": "3" - } - ], - "numberOfBytes": "128" - }, - "t_struct(Reward)4412_storage": { - "label": "struct IPersonaReward.Reward", - "members": [ - { - "label": "id", - "type": "t_uint48", - "offset": 0, - "slot": "0" - }, - { - "label": "mainIndex", - "type": "t_uint32", - "offset": 6, - "slot": "0" - }, - { - "label": "totalStaked", - "type": "t_uint256", - "offset": 0, - "slot": "1" - }, - { - "label": "totalVScore", - "type": "t_uint256", - "offset": 0, - "slot": "2" - }, - { - "label": "totalDatasets", - "type": "t_uint256", - "offset": 0, - "slot": "3" - }, - { - "label": "validatorAmount", - "type": "t_uint256", - "offset": 0, - "slot": "4" - }, - { - "label": "modelAmount", - "type": "t_uint256", - "offset": 0, - "slot": "5" - }, - { - "label": "datasetAmount", - "type": "t_uint256", - "offset": 0, - "slot": "6" - }, - { - "label": "ipAmount", - "type": "t_uint256", - "offset": 0, - "slot": "7" - } - ], - "numberOfBytes": "256" - }, - "t_struct(RewardSettings)7078_storage": { - "label": "struct RewardSettingsCheckpoints.RewardSettings", - "members": [ - { - "label": "uptimeWeight", - "type": "t_uint16", - "offset": 0, - "slot": "0" - }, - { - "label": "stakeWeight", - "type": "t_uint16", - "offset": 2, - "slot": "0" - }, - { - "label": "protocolShares", - "type": "t_uint16", - "offset": 4, - "slot": "0" - }, - { - "label": "contributorShares", - "type": "t_uint16", - "offset": 6, - "slot": "0" - }, - { - "label": "stakerShares", - "type": "t_uint16", - "offset": 8, - "slot": "0" - }, - { - "label": "datasetShares", - "type": "t_uint16", - "offset": 10, - "slot": "0" - }, - { - "label": "impactShares", - "type": "t_uint16", - "offset": 12, - "slot": "0" - }, - { - "label": "ipShares", - "type": "t_uint16", - "offset": 14, - "slot": "0" - } - ], - "numberOfBytes": "32" - }, - "t_struct(RoleData)275_storage": { - "label": "struct AccessControl.RoleData", - "members": [ - { - "label": "hasRole", - "type": "t_mapping(t_address,t_bool)", - "offset": 0, - "slot": "0" - }, - { - "label": "adminRole", - "type": "t_bytes32", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Trace)7061_storage": { - "label": "struct RewardSettingsCheckpoints.Trace", - "members": [ - { - "label": "_checkpoints", - "type": "t_array(t_struct(Checkpoint)7084_storage)dyn_storage", - "offset": 0, - "slot": "0" - } - ], - "numberOfBytes": "32" - }, - "t_uint16": { - "label": "uint16", - "numberOfBytes": "2" - }, - "t_uint256": { - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint32": { - "label": "uint32", - "numberOfBytes": "4" - }, - "t_uint48": { - "label": "uint48", - "numberOfBytes": "6" - } - }, - "namespaces": { - "erc7201:openzeppelin.storage.Initializable": [ - { - "contract": "Initializable", - "label": "_initialized", - "type": "t_uint64", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:69", - "offset": 0, - "slot": "0" - }, - { - "contract": "Initializable", - "label": "_initializing", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:73", - "offset": 8, - "slot": "0" - } - ] - } - } - }, - "d224c037fcb51e125c53947f9d00db1471bc443c11c8cedb7e46208700861742": { - "address": "0xFAFCa3CDA54a1C6fb7c72b1CFae7CA46D8d951AA", - "txHash": "0xd08d08045bd22a6ad47c7a01cc5e062f85770c69da9147e935d518ba9716051b", - "layout": { - "solcVersion": "0.8.20", - "storage": [ - { - "label": "_roles", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_bytes32,t_struct(RoleData)275_storage)", - "contract": "AccessControl", - "src": "@openzeppelin/contracts/access/AccessControl.sol:55" - }, - { - "label": "_nextRewardId", - "offset": 0, - "slot": "1", - "type": "t_uint48", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:30" - }, - { - "label": "rewardToken", - "offset": 6, - "slot": "1", - "type": "t_address", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:34" - }, - { - "label": "personaNft", - "offset": 0, - "slot": "2", - "type": "t_address", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:35" - }, - { - "label": "contributionNft", - "offset": 0, - "slot": "3", - "type": "t_address", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:36" - }, - { - "label": "serviceNft", - "offset": 0, - "slot": "4", - "type": "t_address", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:37" - }, - { - "label": "virtualIPNft", - "offset": 0, - "slot": "5", - "type": "t_address", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:38" - }, - { - "label": "_mainRewards", - "offset": 0, - "slot": "6", - "type": "t_array(t_struct(MainReward)4393_storage)dyn_storage", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:40" - }, - { - "label": "protocolRewards", - "offset": 0, - "slot": "7", - "type": "t_uint256", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:41" - }, - { - "label": "stakeThreshold", - "offset": 0, - "slot": "8", - "type": "t_uint256", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:42" - }, - { - "label": "parentShares", - "offset": 0, - "slot": "9", - "type": "t_uint16", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:43" - }, - { - "label": "_rewardSettings", - "offset": 0, - "slot": "10", - "type": "t_struct(Trace)7073_storage", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:45" - }, - { - "label": "_claimedStakerRewards", - "offset": 0, - "slot": "11", - "type": "t_mapping(t_address,t_mapping(t_uint256,t_struct(Claim)4417_storage))", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:47" - }, - { - "label": "_claimedValidatorRewards", - "offset": 0, - "slot": "12", - "type": "t_mapping(t_address,t_mapping(t_uint256,t_struct(Claim)4417_storage))", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:49" - }, - { - "label": "_rewards", - "offset": 0, - "slot": "13", - "type": "t_mapping(t_uint256,t_array(t_struct(Reward)4412_storage)dyn_storage)", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:51" - }, - { - "label": "_validatorScores", - "offset": 0, - "slot": "14", - "type": "t_mapping(t_address,t_mapping(t_uint48,t_uint256))", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:52" - }, - { - "label": "_modelRewards", - "offset": 0, - "slot": "15", - "type": "t_mapping(t_uint256,t_struct(ModelReward)4431_storage)", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:54" - }, - { - "label": "_datasetClaims", - "offset": 0, - "slot": "16", - "type": "t_mapping(t_uint256,t_struct(Claim)4417_storage)", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:55" - }, - { - "label": "_ipRewards", - "offset": 0, - "slot": "17", - "type": "t_mapping(t_uint256,t_struct(IPReward)4422_storage)", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:59" - } - ], - "types": { - "t_bool": { - "label": "bool", - "numberOfBytes": "1" - }, - "t_struct(InitializableStorage)10_storage": { - "label": "struct Initializable.InitializableStorage", - "members": [ - { - "label": "_initialized", - "type": "t_uint64", - "offset": 0, - "slot": "0" - }, - { - "label": "_initializing", - "type": "t_bool", - "offset": 8, - "slot": "0" - } - ], - "numberOfBytes": "32" - }, - "t_uint64": { - "label": "uint64", - "numberOfBytes": "8" - }, - "t_address": { - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_struct(Checkpoint)7096_storage)dyn_storage": { - "label": "struct RewardSettingsCheckpoints.Checkpoint[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(MainReward)4393_storage)dyn_storage": { - "label": "struct IPersonaReward.MainReward[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Reward)4412_storage)dyn_storage": { - "label": "struct IPersonaReward.Reward[]", - "numberOfBytes": "32" - }, - "t_bytes32": { - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_bool)": { - "label": "mapping(address => bool)", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_mapping(t_uint256,t_struct(Claim)4417_storage))": { - "label": "mapping(address => mapping(uint256 => struct IPersonaReward.Claim))", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_mapping(t_uint48,t_uint256))": { - "label": "mapping(address => mapping(uint48 => uint256))", - "numberOfBytes": "32" - }, - "t_mapping(t_bytes32,t_struct(RoleData)275_storage)": { - "label": "mapping(bytes32 => struct AccessControl.RoleData)", - "numberOfBytes": "32" - }, - "t_mapping(t_uint256,t_array(t_struct(Reward)4412_storage)dyn_storage)": { - "label": "mapping(uint256 => struct IPersonaReward.Reward[])", - "numberOfBytes": "32" - }, - "t_mapping(t_uint256,t_struct(Claim)4417_storage)": { - "label": "mapping(uint256 => struct IPersonaReward.Claim)", - "numberOfBytes": "32" - }, - "t_mapping(t_uint256,t_struct(IPReward)4422_storage)": { - "label": "mapping(uint256 => struct IPersonaReward.IPReward)", - "numberOfBytes": "32" - }, - "t_mapping(t_uint256,t_struct(ModelReward)4431_storage)": { - "label": "mapping(uint256 => struct IPersonaReward.ModelReward)", - "numberOfBytes": "32" - }, - "t_mapping(t_uint48,t_uint256)": { - "label": "mapping(uint48 => uint256)", - "numberOfBytes": "32" - }, - "t_struct(Checkpoint)7096_storage": { - "label": "struct RewardSettingsCheckpoints.Checkpoint", - "members": [ - { - "label": "_key", - "type": "t_uint32", - "offset": 0, - "slot": "0" - }, - { - "label": "_value", - "type": "t_struct(RewardSettings)7090_storage", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Claim)4417_storage": { - "label": "struct IPersonaReward.Claim", - "members": [ - { - "label": "totalClaimed", - "type": "t_uint256", - "offset": 0, - "slot": "0" - }, - { - "label": "rewardCount", - "type": "t_uint32", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_struct(IPReward)4422_storage": { - "label": "struct IPersonaReward.IPReward", - "members": [ - { - "label": "amount", - "type": "t_uint256", - "offset": 0, - "slot": "0" - }, - { - "label": "totalClaimed", - "type": "t_uint256", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_struct(MainReward)4393_storage": { - "label": "struct IPersonaReward.MainReward", - "members": [ - { - "label": "blockNumber", - "type": "t_uint32", - "offset": 0, - "slot": "0" - }, - { - "label": "amount", - "type": "t_uint256", - "offset": 0, - "slot": "1" - }, - { - "label": "personaCount", - "type": "t_uint256", - "offset": 0, - "slot": "2" - }, - { - "label": "totalStaked", - "type": "t_uint256", - "offset": 0, - "slot": "3" - } - ], - "numberOfBytes": "128" - }, - "t_struct(ModelReward)4431_storage": { - "label": "struct IPersonaReward.ModelReward", - "members": [ - { - "label": "amount", - "type": "t_uint256", - "offset": 0, - "slot": "0" - }, - { - "label": "parentAmount", - "type": "t_uint256", - "offset": 0, - "slot": "1" - }, - { - "label": "totalClaimed", - "type": "t_uint256", - "offset": 0, - "slot": "2" - }, - { - "label": "totalClaimedParent", - "type": "t_uint256", - "offset": 0, - "slot": "3" - } - ], - "numberOfBytes": "128" - }, - "t_struct(Reward)4412_storage": { - "label": "struct IPersonaReward.Reward", - "members": [ - { - "label": "id", - "type": "t_uint48", - "offset": 0, - "slot": "0" - }, - { - "label": "mainIndex", - "type": "t_uint32", - "offset": 6, - "slot": "0" - }, - { - "label": "totalStaked", - "type": "t_uint256", - "offset": 0, - "slot": "1" - }, - { - "label": "totalVScore", - "type": "t_uint256", - "offset": 0, - "slot": "2" - }, - { - "label": "totalDatasets", - "type": "t_uint256", - "offset": 0, - "slot": "3" - }, - { - "label": "validatorAmount", - "type": "t_uint256", - "offset": 0, - "slot": "4" - }, - { - "label": "modelAmount", - "type": "t_uint256", - "offset": 0, - "slot": "5" - }, - { - "label": "datasetAmount", - "type": "t_uint256", - "offset": 0, - "slot": "6" - }, - { - "label": "ipAmount", - "type": "t_uint256", - "offset": 0, - "slot": "7" - } - ], - "numberOfBytes": "256" - }, - "t_struct(RewardSettings)7090_storage": { - "label": "struct RewardSettingsCheckpoints.RewardSettings", - "members": [ - { - "label": "uptimeWeight", - "type": "t_uint16", - "offset": 0, - "slot": "0" - }, - { - "label": "stakeWeight", - "type": "t_uint16", - "offset": 2, - "slot": "0" - }, - { - "label": "protocolShares", - "type": "t_uint16", - "offset": 4, - "slot": "0" - }, - { - "label": "contributorShares", - "type": "t_uint16", - "offset": 6, - "slot": "0" - }, - { - "label": "stakerShares", - "type": "t_uint16", - "offset": 8, - "slot": "0" - }, - { - "label": "datasetShares", - "type": "t_uint16", - "offset": 10, - "slot": "0" - }, - { - "label": "impactShares", - "type": "t_uint16", - "offset": 12, - "slot": "0" - }, - { - "label": "ipShares", - "type": "t_uint16", - "offset": 14, - "slot": "0" - } - ], - "numberOfBytes": "32" - }, - "t_struct(RoleData)275_storage": { - "label": "struct AccessControl.RoleData", - "members": [ - { - "label": "hasRole", - "type": "t_mapping(t_address,t_bool)", - "offset": 0, - "slot": "0" - }, - { - "label": "adminRole", - "type": "t_bytes32", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Trace)7073_storage": { - "label": "struct RewardSettingsCheckpoints.Trace", - "members": [ - { - "label": "_checkpoints", - "type": "t_array(t_struct(Checkpoint)7096_storage)dyn_storage", - "offset": 0, - "slot": "0" - } - ], - "numberOfBytes": "32" - }, - "t_uint16": { - "label": "uint16", - "numberOfBytes": "2" - }, - "t_uint256": { - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint32": { - "label": "uint32", - "numberOfBytes": "4" - }, - "t_uint48": { - "label": "uint48", - "numberOfBytes": "6" - } - }, - "namespaces": { - "erc7201:openzeppelin.storage.Initializable": [ - { - "contract": "Initializable", - "label": "_initialized", - "type": "t_uint64", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:69", - "offset": 0, - "slot": "0" - }, - { - "contract": "Initializable", - "label": "_initializing", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:73", - "offset": 8, - "slot": "0" - } - ] - } - } - }, - "b2e01762d15801add4d05b996b8aba377e8f1015c7e36654f7a04adb67bd3e52": { - "address": "0x49a109891b240bA5914A4B8996B5cADe03E3c9F3", - "txHash": "0x7684a6bb1b7ebd2e702995007ae5a2f943656a74e5c23b6f04ba92b8094c88f7", - "layout": { - "solcVersion": "0.8.20", - "storage": [ - { - "label": "_roles", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_bytes32,t_struct(RoleData)275_storage)", - "contract": "AccessControl", - "src": "@openzeppelin/contracts/access/AccessControl.sol:55" - }, - { - "label": "_nextRewardId", - "offset": 0, - "slot": "1", - "type": "t_uint48", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:30" - }, - { - "label": "rewardToken", - "offset": 6, - "slot": "1", - "type": "t_address", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:34" - }, - { - "label": "personaNft", - "offset": 0, - "slot": "2", - "type": "t_address", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:35" - }, - { - "label": "contributionNft", - "offset": 0, - "slot": "3", - "type": "t_address", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:36" - }, - { - "label": "serviceNft", - "offset": 0, - "slot": "4", - "type": "t_address", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:37" - }, - { - "label": "virtualIPNft", - "offset": 0, - "slot": "5", - "type": "t_address", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:38" - }, - { - "label": "_mainRewards", - "offset": 0, - "slot": "6", - "type": "t_array(t_struct(MainReward)4393_storage)dyn_storage", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:40" - }, - { - "label": "protocolRewards", - "offset": 0, - "slot": "7", - "type": "t_uint256", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:41" - }, - { - "label": "stakeThreshold", - "offset": 0, - "slot": "8", - "type": "t_uint256", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:42" - }, - { - "label": "parentShares", - "offset": 0, - "slot": "9", - "type": "t_uint16", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:43" - }, - { - "label": "_rewardSettings", - "offset": 0, - "slot": "10", - "type": "t_struct(Trace)7181_storage", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:45" - }, - { - "label": "_claimedStakerRewards", - "offset": 0, - "slot": "11", - "type": "t_mapping(t_address,t_mapping(t_uint256,t_struct(Claim)4417_storage))", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:47" - }, - { - "label": "_claimedValidatorRewards", - "offset": 0, - "slot": "12", - "type": "t_mapping(t_address,t_mapping(t_uint256,t_struct(Claim)4417_storage))", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:49" - }, - { - "label": "_rewards", - "offset": 0, - "slot": "13", - "type": "t_mapping(t_uint256,t_array(t_struct(Reward)4412_storage)dyn_storage)", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:51" - }, - { - "label": "_validatorScores", - "offset": 0, - "slot": "14", - "type": "t_mapping(t_address,t_mapping(t_uint48,t_uint256))", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:52" - }, - { - "label": "_modelRewards", - "offset": 0, - "slot": "15", - "type": "t_mapping(t_uint256,t_struct(ModelReward)4431_storage)", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:54" - }, - { - "label": "_datasetClaims", - "offset": 0, - "slot": "16", - "type": "t_mapping(t_uint256,t_struct(Claim)4417_storage)", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:55" - }, - { - "label": "_ipRewards", - "offset": 0, - "slot": "17", - "type": "t_mapping(t_uint256,t_struct(IPReward)4422_storage)", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:59" - } - ], - "types": { - "t_bool": { - "label": "bool", - "numberOfBytes": "1" - }, - "t_struct(InitializableStorage)10_storage": { - "label": "struct Initializable.InitializableStorage", - "members": [ - { - "label": "_initialized", - "type": "t_uint64", - "offset": 0, - "slot": "0" - }, - { - "label": "_initializing", - "type": "t_bool", - "offset": 8, - "slot": "0" - } - ], - "numberOfBytes": "32" - }, - "t_uint64": { - "label": "uint64", - "numberOfBytes": "8" - }, - "t_address": { - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_struct(Checkpoint)7204_storage)dyn_storage": { - "label": "struct RewardSettingsCheckpoints.Checkpoint[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(MainReward)4393_storage)dyn_storage": { - "label": "struct IPersonaReward.MainReward[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Reward)4412_storage)dyn_storage": { - "label": "struct IPersonaReward.Reward[]", - "numberOfBytes": "32" - }, - "t_bytes32": { - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_bool)": { - "label": "mapping(address => bool)", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_mapping(t_uint256,t_struct(Claim)4417_storage))": { - "label": "mapping(address => mapping(uint256 => struct IPersonaReward.Claim))", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_mapping(t_uint48,t_uint256))": { - "label": "mapping(address => mapping(uint48 => uint256))", - "numberOfBytes": "32" - }, - "t_mapping(t_bytes32,t_struct(RoleData)275_storage)": { - "label": "mapping(bytes32 => struct AccessControl.RoleData)", - "numberOfBytes": "32" - }, - "t_mapping(t_uint256,t_array(t_struct(Reward)4412_storage)dyn_storage)": { - "label": "mapping(uint256 => struct IPersonaReward.Reward[])", - "numberOfBytes": "32" - }, - "t_mapping(t_uint256,t_struct(Claim)4417_storage)": { - "label": "mapping(uint256 => struct IPersonaReward.Claim)", - "numberOfBytes": "32" - }, - "t_mapping(t_uint256,t_struct(IPReward)4422_storage)": { - "label": "mapping(uint256 => struct IPersonaReward.IPReward)", - "numberOfBytes": "32" - }, - "t_mapping(t_uint256,t_struct(ModelReward)4431_storage)": { - "label": "mapping(uint256 => struct IPersonaReward.ModelReward)", - "numberOfBytes": "32" - }, - "t_mapping(t_uint48,t_uint256)": { - "label": "mapping(uint48 => uint256)", - "numberOfBytes": "32" - }, - "t_struct(Checkpoint)7204_storage": { - "label": "struct RewardSettingsCheckpoints.Checkpoint", - "members": [ - { - "label": "_key", - "type": "t_uint32", - "offset": 0, - "slot": "0" - }, - { - "label": "_value", - "type": "t_struct(RewardSettings)7198_storage", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Claim)4417_storage": { - "label": "struct IPersonaReward.Claim", - "members": [ - { - "label": "totalClaimed", - "type": "t_uint256", - "offset": 0, - "slot": "0" - }, - { - "label": "rewardCount", - "type": "t_uint32", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_struct(IPReward)4422_storage": { - "label": "struct IPersonaReward.IPReward", - "members": [ - { - "label": "amount", - "type": "t_uint256", - "offset": 0, - "slot": "0" - }, - { - "label": "totalClaimed", - "type": "t_uint256", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_struct(MainReward)4393_storage": { - "label": "struct IPersonaReward.MainReward", - "members": [ - { - "label": "blockNumber", - "type": "t_uint32", - "offset": 0, - "slot": "0" - }, - { - "label": "amount", - "type": "t_uint256", - "offset": 0, - "slot": "1" - }, - { - "label": "personaCount", - "type": "t_uint256", - "offset": 0, - "slot": "2" - }, - { - "label": "totalStaked", - "type": "t_uint256", - "offset": 0, - "slot": "3" - } - ], - "numberOfBytes": "128" - }, - "t_struct(ModelReward)4431_storage": { - "label": "struct IPersonaReward.ModelReward", - "members": [ - { - "label": "amount", - "type": "t_uint256", - "offset": 0, - "slot": "0" - }, - { - "label": "parentAmount", - "type": "t_uint256", - "offset": 0, - "slot": "1" - }, - { - "label": "totalClaimed", - "type": "t_uint256", - "offset": 0, - "slot": "2" - }, - { - "label": "totalClaimedParent", - "type": "t_uint256", - "offset": 0, - "slot": "3" - } - ], - "numberOfBytes": "128" - }, - "t_struct(Reward)4412_storage": { - "label": "struct IPersonaReward.Reward", - "members": [ - { - "label": "id", - "type": "t_uint48", - "offset": 0, - "slot": "0" - }, - { - "label": "mainIndex", - "type": "t_uint32", - "offset": 6, - "slot": "0" - }, - { - "label": "totalStaked", - "type": "t_uint256", - "offset": 0, - "slot": "1" - }, - { - "label": "totalVScore", - "type": "t_uint256", - "offset": 0, - "slot": "2" - }, - { - "label": "totalDatasets", - "type": "t_uint256", - "offset": 0, - "slot": "3" - }, - { - "label": "validatorAmount", - "type": "t_uint256", - "offset": 0, - "slot": "4" - }, - { - "label": "modelAmount", - "type": "t_uint256", - "offset": 0, - "slot": "5" - }, - { - "label": "datasetAmount", - "type": "t_uint256", - "offset": 0, - "slot": "6" - }, - { - "label": "ipAmount", - "type": "t_uint256", - "offset": 0, - "slot": "7" - } - ], - "numberOfBytes": "256" - }, - "t_struct(RewardSettings)7198_storage": { - "label": "struct RewardSettingsCheckpoints.RewardSettings", - "members": [ - { - "label": "uptimeWeight", - "type": "t_uint16", - "offset": 0, - "slot": "0" - }, - { - "label": "stakeWeight", - "type": "t_uint16", - "offset": 2, - "slot": "0" - }, - { - "label": "protocolShares", - "type": "t_uint16", - "offset": 4, - "slot": "0" - }, - { - "label": "contributorShares", - "type": "t_uint16", - "offset": 6, - "slot": "0" - }, - { - "label": "stakerShares", - "type": "t_uint16", - "offset": 8, - "slot": "0" - }, - { - "label": "datasetShares", - "type": "t_uint16", - "offset": 10, - "slot": "0" - }, - { - "label": "impactShares", - "type": "t_uint16", - "offset": 12, - "slot": "0" - }, - { - "label": "ipShares", - "type": "t_uint16", - "offset": 14, - "slot": "0" - } - ], - "numberOfBytes": "32" - }, - "t_struct(RoleData)275_storage": { - "label": "struct AccessControl.RoleData", - "members": [ - { - "label": "hasRole", - "type": "t_mapping(t_address,t_bool)", - "offset": 0, - "slot": "0" - }, - { - "label": "adminRole", - "type": "t_bytes32", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Trace)7181_storage": { - "label": "struct RewardSettingsCheckpoints.Trace", - "members": [ - { - "label": "_checkpoints", - "type": "t_array(t_struct(Checkpoint)7204_storage)dyn_storage", - "offset": 0, - "slot": "0" - } - ], - "numberOfBytes": "32" - }, - "t_uint16": { - "label": "uint16", - "numberOfBytes": "2" - }, - "t_uint256": { - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint32": { - "label": "uint32", - "numberOfBytes": "4" - }, - "t_uint48": { - "label": "uint48", - "numberOfBytes": "6" - } - }, - "namespaces": { - "erc7201:openzeppelin.storage.Initializable": [ - { - "contract": "Initializable", - "label": "_initialized", - "type": "t_uint64", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:69", - "offset": 0, - "slot": "0" - }, - { - "contract": "Initializable", - "label": "_initializing", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:73", - "offset": 8, - "slot": "0" - } - ] - } - } - }, - "10d9919c72a8691c03e0d74d548a04aba0121ae60d8abbf09da4163f94a7fae3": { - "address": "0x61C4cAa477788b0111D5cB55d65162d9669d987B", - "txHash": "0xa4615414ba144df4c21b8b9fdbe1b7490d063e92f197e2a7af9606e829366700", - "layout": { - "solcVersion": "0.8.20", - "storage": [ - { - "label": "_roles", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_bytes32,t_struct(RoleData)275_storage)", - "contract": "AccessControl", - "src": "@openzeppelin/contracts/access/AccessControl.sol:55" - }, - { - "label": "_nextId", - "offset": 0, - "slot": "1", - "type": "t_uint256", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:18" - }, - { - "label": "tokenImplementation", - "offset": 0, - "slot": "2", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:19" - }, - { - "label": "daoImplementation", - "offset": 0, - "slot": "3", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:20" - }, - { - "label": "nft", - "offset": 0, - "slot": "4", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:21" - }, - { - "label": "tbaRegistry", - "offset": 0, - "slot": "5", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:22" - }, - { - "label": "applicationThreshold", - "offset": 0, - "slot": "6", - "type": "t_uint256", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:23" - }, - { - "label": "allTokens", - "offset": 0, - "slot": "7", - "type": "t_array(t_address)dyn_storage", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:25" - }, - { - "label": "allDAOs", - "offset": 0, - "slot": "8", - "type": "t_array(t_address)dyn_storage", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:26" - }, - { - "label": "assetToken", - "offset": 0, - "slot": "9", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:28" - }, - { - "label": "protocolDAO", - "offset": 0, - "slot": "10", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:29" - }, - { - "label": "maturityDuration", - "offset": 0, - "slot": "11", - "type": "t_uint256", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:30" - }, - { - "label": "_applications", - "offset": 0, - "slot": "12", - "type": "t_mapping(t_uint256,t_struct(Application)10164_storage)", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:65" - }, - { - "label": "gov", - "offset": 0, - "slot": "13", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:67" - }, - { - "label": "virtualIP", - "offset": 0, - "slot": "14", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:77" - }, - { - "label": "_vault", - "offset": 0, - "slot": "15", - "type": "t_address", - "contract": "PersonaFactory", - "src": "contracts/virtualPersona/PersonaFactory.sol:80" - } - ], - "types": { - "t_bool": { - "label": "bool", - "numberOfBytes": "1" - }, - "t_struct(InitializableStorage)10_storage": { - "label": "struct Initializable.InitializableStorage", - "members": [ - { - "label": "_initialized", - "type": "t_uint64", - "offset": 0, - "slot": "0" - }, - { - "label": "_initializing", - "type": "t_bool", - "offset": 8, - "slot": "0" - } - ], - "numberOfBytes": "32" - }, - "t_uint64": { - "label": "uint64", - "numberOfBytes": "8" - }, - "t_address": { - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_address)dyn_storage": { - "label": "address[]", - "numberOfBytes": "32" - }, - "t_array(t_uint8)dyn_storage": { - "label": "uint8[]", - "numberOfBytes": "32" - }, - "t_bytes32": { - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_enum(ApplicationStatus)10133": { - "label": "enum PersonaFactory.ApplicationStatus", - "members": [ - "Active", - "Executed", - "Withdrawn" - ], - "numberOfBytes": "1" - }, - "t_mapping(t_address,t_bool)": { - "label": "mapping(address => bool)", - "numberOfBytes": "32" - }, - "t_mapping(t_bytes32,t_struct(RoleData)275_storage)": { - "label": "mapping(bytes32 => struct AccessControl.RoleData)", - "numberOfBytes": "32" - }, - "t_mapping(t_uint256,t_struct(Application)10164_storage)": { - "label": "mapping(uint256 => struct PersonaFactory.Application)", - "numberOfBytes": "32" - }, - "t_string_storage": { - "label": "string", - "numberOfBytes": "32" - }, - "t_struct(Application)10164_storage": { - "label": "struct PersonaFactory.Application", - "members": [ - { - "label": "name", - "type": "t_string_storage", - "offset": 0, - "slot": "0" - }, - { - "label": "symbol", - "type": "t_string_storage", - "offset": 0, - "slot": "1" - }, - { - "label": "tokenURI", - "type": "t_string_storage", - "offset": 0, - "slot": "2" - }, - { - "label": "status", - "type": "t_enum(ApplicationStatus)10133", - "offset": 0, - "slot": "3" - }, - { - "label": "withdrawableAmount", - "type": "t_uint256", - "offset": 0, - "slot": "4" - }, - { - "label": "proposer", - "type": "t_address", - "offset": 0, - "slot": "5" - }, - { - "label": "cores", - "type": "t_array(t_uint8)dyn_storage", - "offset": 0, - "slot": "6" - }, - { - "label": "proposalEndBlock", - "type": "t_uint256", - "offset": 0, - "slot": "7" - }, - { - "label": "virtualId", - "type": "t_uint256", - "offset": 0, - "slot": "8" - }, - { - "label": "tbaSalt", - "type": "t_bytes32", - "offset": 0, - "slot": "9" - }, - { - "label": "tbaImplementation", - "type": "t_address", - "offset": 0, - "slot": "10" - }, - { - "label": "daoVotingPeriod", - "type": "t_uint32", - "offset": 20, - "slot": "10" - }, - { - "label": "daoThreshold", - "type": "t_uint256", - "offset": 0, - "slot": "11" - }, - { - "label": "hasIP", - "type": "t_bool", - "offset": 0, - "slot": "12" - } - ], - "numberOfBytes": "416" - }, - "t_struct(RoleData)275_storage": { - "label": "struct AccessControl.RoleData", - "members": [ - { - "label": "hasRole", - "type": "t_mapping(t_address,t_bool)", - "offset": 0, - "slot": "0" - }, - { - "label": "adminRole", - "type": "t_bytes32", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint32": { - "label": "uint32", - "numberOfBytes": "4" - }, - "t_uint8": { - "label": "uint8", - "numberOfBytes": "1" - } - }, - "namespaces": { - "erc7201:openzeppelin.storage.Initializable": [ - { - "contract": "Initializable", - "label": "_initialized", - "type": "t_uint64", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:69", - "offset": 0, - "slot": "0" - }, - { - "contract": "Initializable", - "label": "_initializing", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:73", - "offset": 8, - "slot": "0" - } - ] - } - } - }, - "1cdfeb170158100e63865dc2619b63af603164220ca7d4d5541211124a99479b": { - "address": "0x508cEdA22ac5604d9A2D923C9402eE334A844996", - "txHash": "0x77a9d97b7d29c09a3306e98f3835c131f5173e9be0361745d032d35f15be3c45", - "layout": { - "solcVersion": "0.8.20", - "storage": [ - { - "label": "_roles", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_bytes32,t_struct(RoleData)3781_storage)", - "contract": "AccessControl", - "src": "@openzeppelin/contracts/access/AccessControl.sol:55" - }, - { - "label": "_nextRewardId", - "offset": 0, - "slot": "1", - "type": "t_uint48", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:29" - }, - { - "label": "rewardToken", - "offset": 6, - "slot": "1", - "type": "t_address", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:33" - }, - { - "label": "personaNft", - "offset": 0, - "slot": "2", - "type": "t_address", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:34" - }, - { - "label": "contributionNft", - "offset": 0, - "slot": "3", - "type": "t_address", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:35" - }, - { - "label": "serviceNft", - "offset": 0, - "slot": "4", - "type": "t_address", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:36" - }, - { - "label": "_mainRewards", - "offset": 0, - "slot": "5", - "type": "t_array(t_struct(MainReward)16044_storage)dyn_storage", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:38" - }, - { - "label": "protocolRewards", - "offset": 0, - "slot": "6", - "type": "t_uint256", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:39" - }, - { - "label": "stakeThreshold", - "offset": 0, - "slot": "7", - "type": "t_uint256", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:40" - }, - { - "label": "parentShares", - "offset": 0, - "slot": "8", - "type": "t_uint16", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:41" - }, - { - "label": "_rewardSettings", - "offset": 0, - "slot": "9", - "type": "t_struct(Trace)19290_storage", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:43" - }, - { - "label": "_claimedStakerRewards", - "offset": 0, - "slot": "10", - "type": "t_mapping(t_address,t_mapping(t_uint256,t_struct(Claim)16066_storage))", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:45" - }, - { - "label": "_claimedValidatorRewards", - "offset": 0, - "slot": "11", - "type": "t_mapping(t_address,t_mapping(t_uint256,t_struct(Claim)16066_storage))", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:47" - }, - { - "label": "_rewards", - "offset": 0, - "slot": "12", - "type": "t_mapping(t_uint256,t_array(t_struct(Reward)16061_storage)dyn_storage)", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:49" - }, - { - "label": "_validatorScores", - "offset": 0, - "slot": "13", - "type": "t_mapping(t_address,t_mapping(t_uint48,t_uint256))", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:50" - }, - { - "label": "_modelRewards", - "offset": 0, - "slot": "14", - "type": "t_mapping(t_uint256,t_struct(ModelReward)16075_storage)", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:52" - }, - { - "label": "_datasetClaims", - "offset": 0, - "slot": "15", - "type": "t_mapping(t_uint256,t_struct(Claim)16066_storage)", - "contract": "PersonaReward", - "src": "contracts/PersonaReward.sol:53" - } - ], - "types": { - "t_bool": { - "label": "bool", - "numberOfBytes": "1" - }, - "t_struct(InitializableStorage)489_storage": { - "label": "struct Initializable.InitializableStorage", - "members": [ - { - "label": "_initialized", - "type": "t_uint64", - "offset": 0, - "slot": "0" - }, - { - "label": "_initializing", - "type": "t_bool", - "offset": 8, - "slot": "0" - } - ], - "numberOfBytes": "32" - }, - "t_uint64": { - "label": "uint64", - "numberOfBytes": "8" - }, - "t_address": { - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_struct(Checkpoint)19311_storage)dyn_storage": { - "label": "struct RewardSettingsCheckpoints.Checkpoint[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(MainReward)16044_storage)dyn_storage": { - "label": "struct IPersonaReward.MainReward[]", - "numberOfBytes": "32" - }, - "t_array(t_struct(Reward)16061_storage)dyn_storage": { - "label": "struct IPersonaReward.Reward[]", - "numberOfBytes": "32" - }, - "t_bytes32": { - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_bool)": { - "label": "mapping(address => bool)", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_mapping(t_uint256,t_struct(Claim)16066_storage))": { - "label": "mapping(address => mapping(uint256 => struct IPersonaReward.Claim))", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_mapping(t_uint48,t_uint256))": { - "label": "mapping(address => mapping(uint48 => uint256))", - "numberOfBytes": "32" - }, - "t_mapping(t_bytes32,t_struct(RoleData)3781_storage)": { - "label": "mapping(bytes32 => struct AccessControl.RoleData)", - "numberOfBytes": "32" - }, - "t_mapping(t_uint256,t_array(t_struct(Reward)16061_storage)dyn_storage)": { - "label": "mapping(uint256 => struct IPersonaReward.Reward[])", - "numberOfBytes": "32" - }, - "t_mapping(t_uint256,t_struct(Claim)16066_storage)": { - "label": "mapping(uint256 => struct IPersonaReward.Claim)", - "numberOfBytes": "32" - }, - "t_mapping(t_uint256,t_struct(ModelReward)16075_storage)": { - "label": "mapping(uint256 => struct IPersonaReward.ModelReward)", - "numberOfBytes": "32" - }, - "t_mapping(t_uint48,t_uint256)": { - "label": "mapping(uint48 => uint256)", - "numberOfBytes": "32" - }, - "t_struct(Checkpoint)19311_storage": { - "label": "struct RewardSettingsCheckpoints.Checkpoint", - "members": [ - { - "label": "_key", - "type": "t_uint32", - "offset": 0, - "slot": "0" - }, - { - "label": "_value", - "type": "t_struct(RewardSettings)19305_storage", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Claim)16066_storage": { - "label": "struct IPersonaReward.Claim", - "members": [ - { - "label": "totalClaimed", - "type": "t_uint256", - "offset": 0, - "slot": "0" - }, - { - "label": "rewardCount", - "type": "t_uint32", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_struct(MainReward)16044_storage": { - "label": "struct IPersonaReward.MainReward", - "members": [ - { - "label": "blockNumber", - "type": "t_uint32", - "offset": 0, - "slot": "0" - }, - { - "label": "amount", - "type": "t_uint256", - "offset": 0, - "slot": "1" - }, - { - "label": "personaCount", - "type": "t_uint256", - "offset": 0, - "slot": "2" - }, - { - "label": "totalStaked", - "type": "t_uint256", - "offset": 0, - "slot": "3" - } - ], - "numberOfBytes": "128" - }, - "t_struct(ModelReward)16075_storage": { - "label": "struct IPersonaReward.ModelReward", - "members": [ - { - "label": "amount", - "type": "t_uint256", - "offset": 0, - "slot": "0" - }, - { - "label": "parentAmount", - "type": "t_uint256", - "offset": 0, - "slot": "1" - }, - { - "label": "totalClaimed", - "type": "t_uint256", - "offset": 0, - "slot": "2" - }, - { - "label": "totalClaimedParent", - "type": "t_uint256", - "offset": 0, - "slot": "3" - } - ], - "numberOfBytes": "128" - }, - "t_struct(Reward)16061_storage": { - "label": "struct IPersonaReward.Reward", - "members": [ - { - "label": "id", - "type": "t_uint48", - "offset": 0, - "slot": "0" - }, - { - "label": "mainIndex", - "type": "t_uint32", - "offset": 6, - "slot": "0" - }, - { - "label": "totalStaked", - "type": "t_uint256", - "offset": 0, - "slot": "1" - }, - { - "label": "totalVScore", - "type": "t_uint256", - "offset": 0, - "slot": "2" - }, - { - "label": "totalDatasets", - "type": "t_uint256", - "offset": 0, - "slot": "3" - }, - { - "label": "validatorAmount", - "type": "t_uint256", - "offset": 0, - "slot": "4" - }, - { - "label": "modelAmount", - "type": "t_uint256", - "offset": 0, - "slot": "5" - }, - { - "label": "datasetAmount", - "type": "t_uint256", - "offset": 0, - "slot": "6" - } - ], - "numberOfBytes": "224" - }, - "t_struct(RewardSettings)19305_storage": { - "label": "struct RewardSettingsCheckpoints.RewardSettings", - "members": [ - { - "label": "uptimeWeight", - "type": "t_uint16", - "offset": 0, - "slot": "0" - }, - { - "label": "stakeWeight", - "type": "t_uint16", - "offset": 2, - "slot": "0" - }, - { - "label": "protocolShares", - "type": "t_uint16", - "offset": 4, - "slot": "0" - }, - { - "label": "contributorShares", - "type": "t_uint16", - "offset": 6, - "slot": "0" - }, - { - "label": "stakerShares", - "type": "t_uint16", - "offset": 8, - "slot": "0" - }, - { - "label": "datasetShares", - "type": "t_uint16", - "offset": 10, - "slot": "0" - }, - { - "label": "impactShares", - "type": "t_uint16", - "offset": 12, - "slot": "0" - } - ], - "numberOfBytes": "32" - }, - "t_struct(RoleData)3781_storage": { - "label": "struct AccessControl.RoleData", - "members": [ - { - "label": "hasRole", - "type": "t_mapping(t_address,t_bool)", - "offset": 0, - "slot": "0" - }, - { - "label": "adminRole", - "type": "t_bytes32", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Trace)19290_storage": { - "label": "struct RewardSettingsCheckpoints.Trace", - "members": [ - { - "label": "_checkpoints", - "type": "t_array(t_struct(Checkpoint)19311_storage)dyn_storage", - "offset": 0, - "slot": "0" - } - ], - "numberOfBytes": "32" - }, - "t_uint16": { - "label": "uint16", - "numberOfBytes": "2" - }, - "t_uint256": { - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint32": { - "label": "uint32", - "numberOfBytes": "4" - }, - "t_uint48": { - "label": "uint48", - "numberOfBytes": "6" - } - }, - "namespaces": { - "erc7201:openzeppelin.storage.Initializable": [ - { - "contract": "Initializable", - "label": "_initialized", - "type": "t_uint64", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:69", - "offset": 0, - "slot": "0" - }, - { - "contract": "Initializable", - "label": "_initializing", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:73", - "offset": 8, - "slot": "0" - } - ] - } - } - } - } -} diff --git a/README.md b/README.md index 644fcc6..62a7318 100644 --- a/README.md +++ b/README.md @@ -8,54 +8,54 @@ | veVirtualToken | This is a non-transferrable voting token to be used to vote on Virtual Protocol DAO and Virtual Genesis DAO | Ownable | N | | VirtualProtocolDAO | Regular DAO to maintain the VIRTUAL ecosystem | - | N | | VirtualGenesisDAO | Used to vote for instantiation of a VIRTUAL. This DAO allows early execution of proposal as soon as quorum (10k votes) is reached. | - | N | -| PersonaFactory | Handles the application & instantiation of a new VIRTUAL. References to TBA registry, VIRTUAL DAO/Token implementation and Persona NFT vault contracts are stored here. | Roles : DEFAULT_ADMIN_ROLE, WITHDRAW_ROLE | Y | -| PersonaNft | This is the main registry for Persona, Core and Validator. Used to generate ICV wallet address. | Roles: DEFAULT_ADMIN_ROLE, VALIDATOR_ADMIN_ROLE, MINTER_ROLE | N | -| ContributionNft | Each contribution will mint a new ContributionNft. Anyone can propose a new contribution at the VIRTUAL DAO and mint token using the proposal Id. | - | N | -| ServiceNft | Accepted contribution will mint a ServiceNft, restricted to only VIRTUAL DAO can mint a ServiceNft. User can query the latest service NFT for a VIRTUAL CORE. | - | N | -| PersonaToken | This is implementation contract for VIRTUAL staking. PersonaFactory will clone this during VIRTUAL instantiation. Staked token is non-transferable. | - | N | -| PersonaDAO | This is implementation contract for VIRTUAL specific DAO. PersonaFactory will clone this during VIRTUAL instantiation. It holds the maturity score for each core service. | - | N | -| PersonaReward | This is reward distribution center. | Roles: GOV_ROLE, TOKEN_SAVER_ROLE | Y | +| AgentFactory | Handles the application & instantiation of a new VIRTUAL. References to TBA registry, VIRTUAL DAO/Token implementation and Persona NFT vault contracts are stored here. | Roles : DEFAULT_ADMIN_ROLE, WITHDRAW_ROLE | Y | +| AgentNft | This is the main registry for Persona, Core and Validator. Used to generate ICV wallet address. | Roles: DEFAULT_ADMIN_ROLE, VALIDATOR_ADMIN_ROLE, MINTER_ROLE | Y | +| ContributionNft | Each contribution will mint a new ContributionNft. Anyone can propose a new contribution at the VIRTUAL DAO and mint token using the proposal Id. | - | Y | +| ServiceNft | Accepted contribution will mint a ServiceNft, restricted to only VIRTUAL DAO can mint a ServiceNft. User can query the latest service NFT for a VIRTUAL CORE. | - | Y | +| AgentToken | This is implementation contract for VIRTUAL staking. AgentFactory will clone this during VIRTUAL instantiation. Staked token is non-transferable. | - | N | +| AgentDAO | This is implementation contract for VIRTUAL specific DAO. AgentFactory will clone this during VIRTUAL instantiation. It holds the maturity score for each core service. | - | N | +| AgentReward | This is reward distribution center. | Roles: GOV_ROLE, TOKEN_SAVER_ROLE | Y | | TimeLockStaking | Allows user to stake their $VIRTUAL in exchange for $sVIRTUAL | Roles: GOV_ROLE, TOKEN_SAVER_ROLE | N | # Main Activities ## VIRTUAL Genesis -1. Submit a new application at **PersonaFactory** - a. It will transfer $VIRTUAL to PersonaFactory +1. Submit a new application at **AgentFactory** + a. It will transfer $VIRTUAL to AgentFactory 2. Propose at **VirtualGenesisDAO** (action = ```VirtualFactory.executeApplication``` ) 3. Start voting at **VirtualGenesisDAO** 4. Execute proposal at **VirtualGenesisDAO** , it will do following: - a. Clone **PersonaToken** - b. Clone **PersonaDAO** - c. Mint **PersonaNft** + a. Clone **AgentToken** + b. Clone **AgentDAO** + c. Mint **AgentNft** d. Stake $VIRTUAL -> $PERSONA (depending on the symbol sent to application) - e. Create **TBA** with **PersonaNft** + e. Create **TBA** with **AgentNft** ## Submit Contribution -1. Create proposal at **PersonaDAO** (action = ServiceNft.mint) +1. Create proposal at **AgentDAO** (action = ServiceNft.mint) 2. Mint **ContributionNft** , it will authenticate by checking whether sender is the proposal's proposer. ## Upgrading Core -1. Validator vote for contribution proposal at **PersonaDAO** -2. Execute proposal at **PersonaDAO**, it will mint a **ServiceNft**, and trigger following actions: +1. Validator vote for contribution proposal at **AgentDAO** +2. Execute proposal at **AgentDAO**, it will mint a **ServiceNft**, and trigger following actions: a. Update maturity score b. Update VIRTUAL core service id. ## Distribute Reward 1. On daily basis, protocol backend will conclude daily profits into a single amount. -2. Protocol backend calls **PersonaReward**.distributeRewards , triggering following: - a. Transfer $VIRTUAL into **PersonaReward** +2. Protocol backend calls **AgentReward**.distributeRewards , triggering following: + a. Transfer $VIRTUAL into **AgentReward** b. Account & update claimable amounts for: Protocol, Stakers, Validators, Dataset Contributors, Model Contributors ## Claim Reward -1. Protocol calls **PersonaReward**.withdrawProtocolRewards -2. Stakers, Validators, Dataset Contributors, Model Contributors calls **PersonaReward**.claimAllRewards +1. Protocol calls **AgentReward**.withdrawProtocolRewards +2. Stakers, Validators, Dataset Contributors, Model Contributors calls **AgentReward**.claimAllRewards ## Staking VIRTUAL -1. Call **PersonaToken**.stake , pass in the validator that you would like to delegate your voting power to. It will take in $sVIRTUAL and mint $*PERSONA* to you. -2. Call **PersonaToken**.withdraw to withdraw , will burn your $*PERSONA* and return $sVIRTUAL to you. \ No newline at end of file +1. Call **AgentToken**.stake , pass in the validator that you would like to delegate your voting power to. It will take in $sVIRTUAL and mint $*PERSONA* to you. +2. Call **AgentToken**.withdraw to withdraw , will burn your $*PERSONA* and return $sVIRTUAL to you. \ No newline at end of file diff --git a/contracts/PersonaReward.sol b/contracts/AgentReward.sol similarity index 97% rename from contracts/PersonaReward.sol rename to contracts/AgentReward.sol index e614739..3e1387e 100644 --- a/contracts/PersonaReward.sol +++ b/contracts/AgentReward.sol @@ -8,16 +8,16 @@ import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import {IERC5805} from "@openzeppelin/contracts/interfaces/IERC5805.sol"; import {SafeCast} from "@openzeppelin/contracts/utils/math/SafeCast.sol"; -import "./virtualPersona/IPersonaNft.sol"; -import "./virtualPersona/IPersonaToken.sol"; +import "./virtualPersona/IAgentNft.sol"; +import "./virtualPersona/IAgentToken.sol"; import "./libs/RewardSettingsCheckpoints.sol"; import "./contribution/IContributionNft.sol"; import "./contribution/IServiceNft.sol"; import "./libs/TokenSaver.sol"; -import "./IPersonaReward.sol"; +import "./IAgentReward.sol"; -contract PersonaReward is - IPersonaReward, +contract AgentReward is + IAgentReward, Initializable, AccessControl, TokenSaver @@ -147,7 +147,7 @@ contract PersonaReward is // Stake portion uint256 normalizedVoteScore = totalStaked > 0 ? (DENOMINATOR * - IPersonaNft(personaNft).getVotes(virtualId, validator)) / + IAgentNft(personaNft).getVotes(virtualId, validator)) / totalStaked : 0; @@ -157,10 +157,10 @@ contract PersonaReward is return uptimeShares + stakeShares; } - function _distributePersonaRewards( + function _distributeAgentRewards( uint256 amount ) private returns (uint256 personaCount) { - IPersonaNft nft = IPersonaNft(personaNft); + IAgentNft nft = IAgentNft(personaNft); uint256 grandTotalStaked = 0; // Total staked amount for all personas personaCount = nft.totalSupply(); uint32 mainPos = SafeCast.toUint32(_mainRewards.length); @@ -251,7 +251,7 @@ contract PersonaReward is uint256 amount, uint256 totalMaturity ) private { - uint256[] memory services = IPersonaNft(personaNft).getAllServices( + uint256[] memory services = IAgentNft(personaNft).getAllServices( virtualId ); uint256 serviceId; @@ -295,7 +295,7 @@ contract PersonaReward is uint256 impactAmount = (amount * uint256(settings.impactShares)) / DENOMINATOR; - uint8[] memory coreTypes = IPersonaNft(personaNft) + uint8[] memory coreTypes = IAgentNft(personaNft) .virtualInfo(virtualId) .coreTypes; uint256[] memory currentServices = new uint256[](coreTypes.length); @@ -352,7 +352,7 @@ contract PersonaReward is protocolRewards += protocolShares; uint256 personaShares = amount - protocolShares; - uint256 personaCount = _distributePersonaRewards(personaShares); + uint256 personaCount = _distributeAgentRewards(personaShares); uint32 mainRewardIndex = SafeCast.toUint32(_mainRewards.length - 1); RewardSettingsCheckpoints.RewardSettings memory settings = getRewardSettings(); @@ -382,7 +382,7 @@ contract PersonaReward is ) private view returns (uint256) { Reward memory reward = getReward(virtualId, SafeCast.toUint32(pos)); MainReward memory mainReward = getMainReward(reward.mainIndex); - IPersonaToken token = IPersonaToken(stakingAddress); + IAgentToken token = IAgentToken(stakingAddress); address delegatee = token.getPastDelegates( account, @@ -416,7 +416,7 @@ contract PersonaReward is uint256 virtualId, address account ) public view returns (uint256) { - address stakingAddress = IPersonaNft(personaNft) + address stakingAddress = IAgentNft(personaNft) .virtualInfo(virtualId) .token; @@ -438,7 +438,7 @@ contract PersonaReward is return 0; } - address stakingAddress = IPersonaNft(personaNft) + address stakingAddress = IAgentNft(personaNft) .virtualInfo(virtualId) .token; diff --git a/contracts/IPersonaReward.sol b/contracts/IAgentReward.sol similarity index 98% rename from contracts/IPersonaReward.sol rename to contracts/IAgentReward.sol index c123b87..d7731e7 100644 --- a/contracts/IPersonaReward.sol +++ b/contracts/IAgentReward.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.20; -interface IPersonaReward { +interface IAgentReward { struct MainReward { uint32 blockNumber; uint256 amount; diff --git a/contracts/contribution/ContributionNft.sol b/contracts/contribution/ContributionNft.sol index 07eb5ba..a725976 100644 --- a/contracts/contribution/ContributionNft.sol +++ b/contracts/contribution/ContributionNft.sol @@ -3,19 +3,21 @@ pragma solidity ^0.8.20; import "@openzeppelin/contracts/governance/IGovernor.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; -import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; -import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; +import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/interfaces/IERC5805.sol"; +import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "./IContributionNft.sol"; -import "../virtualPersona/IPersonaNft.sol"; +import "../virtualPersona/IAgentNft.sol"; contract ContributionNft is IContributionNft, - ERC721, - ERC721Enumerable, - ERC721URIStorage + Initializable, + ERC721Upgradeable, + ERC721EnumerableUpgradeable, + ERC721URIStorageUpgradeable { address public personaNft; @@ -30,7 +32,8 @@ contract ContributionNft is address private _admin; // Admin is able to create contribution proposal without votes - constructor(address thePersonaAddress) ERC721("Contribution", "VC") { + function initialize(address thePersonaAddress) public initializer { + __ERC721_init("Contribution", "VC"); personaNft = thePersonaAddress; _admin = _msgSender(); } @@ -39,13 +42,13 @@ contract ContributionNft is return _contributionVirtualId[tokenId]; } - function getPersonaDAO(uint256 virtualId) public view returns (IGovernor) { - return IGovernor(IPersonaNft(personaNft).virtualInfo(virtualId).dao); + function getAgentDAO(uint256 virtualId) public view returns (IGovernor) { + return IGovernor(IAgentNft(personaNft).virtualInfo(virtualId).dao); } function isAccepted(uint256 tokenId) public view returns (bool) { uint256 virtualId = _contributionVirtualId[tokenId]; - IGovernor personaDAO = getPersonaDAO(virtualId); + IGovernor personaDAO = getAgentDAO(virtualId); return personaDAO.state(tokenId) == IGovernor.ProposalState.Succeeded; } @@ -58,7 +61,7 @@ contract ContributionNft is uint256 parentId, bool isModel_ ) external returns (uint256) { - IGovernor personaDAO = getPersonaDAO(virtualId); + IGovernor personaDAO = getAgentDAO(virtualId); require( msg.sender == personaDAO.proposalProposer(proposalId), "Only proposal proposer can mint Contribution NFT" @@ -97,7 +100,7 @@ contract ContributionNft is ) public view - override(IContributionNft, ERC721, ERC721URIStorage) + override(IContributionNft, ERC721Upgradeable, ERC721URIStorageUpgradeable) returns (string memory) { return super.tokenURI(tokenId); @@ -122,7 +125,7 @@ contract ContributionNft is ) public view - override(ERC721, ERC721URIStorage, ERC721Enumerable) + override(ERC721Upgradeable, ERC721URIStorageUpgradeable, ERC721EnumerableUpgradeable) returns (bool) { return super.supportsInterface(interfaceId); @@ -131,7 +134,7 @@ contract ContributionNft is function _increaseBalance( address account, uint128 amount - ) internal override(ERC721, ERC721Enumerable) { + ) internal override(ERC721Upgradeable, ERC721EnumerableUpgradeable) { return super._increaseBalance(account, amount); } @@ -139,7 +142,7 @@ contract ContributionNft is address to, uint256 tokenId, address auth - ) internal override(ERC721, ERC721Enumerable) returns (address) { + ) internal override(ERC721Upgradeable, ERC721EnumerableUpgradeable) returns (address) { return super._update(to, tokenId, auth); } @@ -147,7 +150,9 @@ contract ContributionNft is return modelContributions[tokenId]; } - function ownerOf(uint256 tokenId) public view override(IERC721, ERC721) returns (address) { + function ownerOf( + uint256 tokenId + ) public view override(IERC721, ERC721Upgradeable) returns (address) { return _ownerOf(tokenId); } } diff --git a/contracts/contribution/ServiceNft.sol b/contracts/contribution/ServiceNft.sol index ee1de07..85a9466 100644 --- a/contracts/contribution/ServiceNft.sol +++ b/contracts/contribution/ServiceNft.sol @@ -3,21 +3,28 @@ pragma solidity ^0.8.20; import "@openzeppelin/contracts/governance/IGovernor.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; -import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; +import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/interfaces/IERC5805.sol"; -import "@openzeppelin/contracts/access/AccessControl.sol"; -import "../virtualPersona/IPersonaNft.sol"; -import "../virtualPersona/IPersonaDAO.sol"; +import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; +import "../virtualPersona/IAgentNft.sol"; +import "../virtualPersona/IAgentDAO.sol"; import "./IContributionNft.sol"; import "./IServiceNft.sol"; -contract ServiceNft is IServiceNft, ERC721, ERC721Enumerable, ERC721URIStorage { +contract ServiceNft is + IServiceNft, + Initializable, + ERC721Upgradeable, + ERC721EnumerableUpgradeable, + ERC721URIStorageUpgradeable +{ uint256 private _nextTokenId; - address public immutable personaNft; - address public immutable contributionNft; + address public personaNft; + address public contributionNft; mapping(uint256 tokenId => uint8 coreId) private _cores; mapping(uint256 tokenId => uint16 maturity) private _maturities; @@ -37,11 +44,12 @@ contract ServiceNft is IServiceNft, ERC721, ERC721Enumerable, ERC721URIStorage { bool isModel ); - constructor( - address initialPersonaNft, + function initialize( + address initialAgentNft, address initialContributionNft - ) ERC721("Service", "VS") { - personaNft = initialPersonaNft; + ) public initializer { + __ERC721_init("Service", "VS"); + personaNft = initialAgentNft; contributionNft = initialContributionNft; } @@ -49,7 +57,7 @@ contract ServiceNft is IServiceNft, ERC721, ERC721Enumerable, ERC721URIStorage { uint256 virtualId, bytes32 descHash ) external returns (uint256) { - IPersonaNft.VirtualInfo memory info = IPersonaNft(personaNft) + IAgentNft.VirtualInfo memory info = IAgentNft(personaNft) .virtualInfo(virtualId); require(_msgSender() == info.dao, "Caller is not VIRTUAL DAO"); @@ -76,7 +84,7 @@ contract ServiceNft is IServiceNft, ERC721, ERC721Enumerable, ERC721URIStorage { proposalId ); // Calculate maturity - _maturities[proposalId] = IPersonaDAO(info.dao).getMaturity(proposalId); + _maturities[proposalId] = IAgentDAO(info.dao).getMaturity(proposalId); // Calculate impact // Get current service maturity uint256 prevServiceId = _coreServices[virtualId][_cores[proposalId]]; @@ -159,7 +167,7 @@ contract ServiceNft is IServiceNft, ERC721, ERC721Enumerable, ERC721URIStorage { function tokenURI( uint256 tokenId - ) public view override(ERC721, ERC721URIStorage) returns (string memory) { + ) public view override(ERC721Upgradeable, ERC721URIStorageUpgradeable) returns (string memory) { // Service NFT is a mirror of Contribution NFT return IContributionNft(contributionNft).tokenURI(tokenId); } @@ -169,7 +177,7 @@ contract ServiceNft is IServiceNft, ERC721, ERC721Enumerable, ERC721URIStorage { ) public view - override(ERC721, ERC721URIStorage, ERC721Enumerable) + override(ERC721Upgradeable, ERC721URIStorageUpgradeable, ERC721EnumerableUpgradeable) returns (bool) { return super.supportsInterface(interfaceId); @@ -178,7 +186,7 @@ contract ServiceNft is IServiceNft, ERC721, ERC721Enumerable, ERC721URIStorage { function _increaseBalance( address account, uint128 amount - ) internal override(ERC721, ERC721Enumerable) { + ) internal override(ERC721Upgradeable, ERC721EnumerableUpgradeable) { return super._increaseBalance(account, amount); } @@ -186,7 +194,7 @@ contract ServiceNft is IServiceNft, ERC721, ERC721Enumerable, ERC721URIStorage { address to, uint256 tokenId, address auth - ) internal override(ERC721, ERC721Enumerable) returns (address) { + ) internal override(ERC721Upgradeable, ERC721EnumerableUpgradeable) returns (address) { return super._update(to, tokenId, auth); } } diff --git a/contracts/governance/VirtualGenesisDAO.sol b/contracts/governance/VirtualGenesisDAO.sol index 134034a..80f1111 100644 --- a/contracts/governance/VirtualGenesisDAO.sol +++ b/contracts/governance/VirtualGenesisDAO.sol @@ -8,6 +8,7 @@ import "@openzeppelin/contracts/governance/extensions/GovernorStorage.sol"; import "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol"; import "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol"; import "./GovernorCountingSimple.sol"; +import {Checkpoints} from "@openzeppelin/contracts/utils/structs/Checkpoints.sol"; contract VirtualGenesisDAO is Governor, @@ -16,7 +17,14 @@ contract VirtualGenesisDAO is GovernorVotes, GovernorCountingSimple { + using Checkpoints for Checkpoints.Trace224; + mapping(uint256 => bool) _earlyExecutions; + Checkpoints.Trace224 private _quorumCheckpoints; + + uint256 private _quorum; + + event QuorumUpdated(uint224 oldQuorum, uint224 newQuorum); constructor( IVotes token, @@ -31,7 +39,9 @@ contract VirtualGenesisDAO is initialProposalThreshold ) GovernorVotes(token) - {} + { + _quorumCheckpoints.push(0, 10000e18); + } // The following functions are overrides required by Solidity. @@ -84,8 +94,19 @@ contract VirtualGenesisDAO is function quorum( uint256 blockNumber - ) public pure override returns (uint256) { - return 10000e18; + ) public view override returns (uint256) { + uint256 length = _quorumCheckpoints.length(); + + // Optimistic search, check the latest checkpoint + Checkpoints.Checkpoint224 memory latest = _quorumCheckpoints.at(SafeCast.toUint32(length - 1)); + uint48 latestKey = latest._key; + uint224 latestValue = latest._value; + if (latestKey <= blockNumber) { + return latestValue; + } + + // Otherwise, do the binary search + return _quorumCheckpoints.upperLookupRecent(SafeCast.toUint32(blockNumber)); } function earlyExecute(uint256 proposalId) public payable returns (uint256) { @@ -119,10 +140,21 @@ contract VirtualGenesisDAO is } // Handle early execution - function state(uint256 proposalId) public view override returns (ProposalState) { + function state( + uint256 proposalId + ) public view override returns (ProposalState) { if (_earlyExecutions[proposalId]) { return ProposalState.Executed; } return super.state(proposalId); } + + function updateQuorum(uint224 newQuorum) public onlyGovernance { + uint224 oldQuorum = _quorumCheckpoints.latest(); + _quorumCheckpoints.push( + SafeCast.toUint32(clock()), + SafeCast.toUint208(newQuorum) + ); + emit QuorumUpdated(oldQuorum, newQuorum); + } } diff --git a/contracts/virtualPersona/PersonaDAO.sol b/contracts/virtualPersona/AgentDAO.sol similarity index 98% rename from contracts/virtualPersona/PersonaDAO.sol rename to contracts/virtualPersona/AgentDAO.sol index 67e47ac..ee8eae3 100644 --- a/contracts/virtualPersona/PersonaDAO.sol +++ b/contracts/virtualPersona/AgentDAO.sol @@ -7,14 +7,14 @@ import "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorStorag import "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorVotesUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol"; import "@openzeppelin/contracts/utils/structs/Checkpoints.sol"; -import "./IPersonaDAO.sol"; +import "./IAgentDAO.sol"; import "./GovernorCountingSimpleUpgradeable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "../contribution/IContributionNft.sol"; -contract PersonaDAO is - IPersonaDAO, +contract AgentDAO is + IAgentDAO, GovernorUpgradeable, GovernorSettingsUpgradeable, GovernorCountingSimpleUpgradeable, @@ -125,7 +125,7 @@ contract PersonaDAO is function proposalCount() public view - override(IPersonaDAO, GovernorStorageUpgradeable) + override(IAgentDAO, GovernorStorageUpgradeable) returns (uint256) { return super.proposalCount(); diff --git a/contracts/virtualPersona/PersonaFactory.sol b/contracts/virtualPersona/AgentFactory.sol similarity index 94% rename from contracts/virtualPersona/PersonaFactory.sol rename to contracts/virtualPersona/AgentFactory.sol index 39aa119..adbbbb5 100644 --- a/contracts/virtualPersona/PersonaFactory.sol +++ b/contracts/virtualPersona/AgentFactory.sol @@ -8,12 +8,12 @@ import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; -import "./IPersonaToken.sol"; -import "./IPersonaDAO.sol"; -import "./IPersonaNft.sol"; +import "./IAgentToken.sol"; +import "./IAgentDAO.sol"; +import "./IAgentNft.sol"; import "../libs/IERC6551Registry.sol"; -contract PersonaFactory is Initializable, AccessControl { +contract AgentFactory is Initializable, AccessControl { uint256 private _nextId; address public tokenImplementation; address public daoImplementation; @@ -195,7 +195,7 @@ contract PersonaFactory is Initializable, AccessControl { ); Application storage application = _applications[id]; - address token = _createNewPersonaToken( + address token = _createNewAgentToken( application.name, application.symbol, application.proposer @@ -209,7 +209,7 @@ contract PersonaFactory is Initializable, AccessControl { application.daoThreshold ) ); - uint256 virtualId = IPersonaNft(nft).mint( + uint256 virtualId = IAgentNft(nft).mint( _vault, application.tokenURI, dao, @@ -218,7 +218,7 @@ contract PersonaFactory is Initializable, AccessControl { ); IERC20(assetToken).approve(token, application.withdrawableAmount); - IPersonaToken(token).stake( + IAgentToken(token).stake( application.withdrawableAmount, application.proposer, application.proposer @@ -235,7 +235,7 @@ contract PersonaFactory is Initializable, AccessControl { virtualId ); - IPersonaNft(nft).setTBA(virtualId, tbaAddress); + IAgentNft(nft).setTBA(virtualId, tbaAddress); application.withdrawableAmount = 0; application.status = ApplicationStatus.Executed; @@ -251,10 +251,10 @@ contract PersonaFactory is Initializable, AccessControl { uint256 daoThreshold ) internal returns (address instance) { instance = Clones.clone(daoImplementation); - IPersonaDAO(instance).initialize( + IAgentDAO(instance).initialize( name, token, - IPersonaNft(nft).getContributionNft(), + IAgentNft(nft).getContributionNft(), daoThreshold, daoVotingPeriod ); @@ -263,13 +263,13 @@ contract PersonaFactory is Initializable, AccessControl { return instance; } - function _createNewPersonaToken( + function _createNewAgentToken( string memory name, string memory symbol, address founder ) internal returns (address instance) { instance = Clones.clone(tokenImplementation); - IPersonaToken(instance).initialize( + IAgentToken(instance).initialize( name, symbol, founder, diff --git a/contracts/virtualPersona/PersonaNft.sol b/contracts/virtualPersona/AgentNft.sol similarity index 84% rename from contracts/virtualPersona/PersonaNft.sol rename to contracts/virtualPersona/AgentNft.sol index b08b5dd..46eaa3a 100644 --- a/contracts/virtualPersona/PersonaNft.sol +++ b/contracts/virtualPersona/AgentNft.sol @@ -4,21 +4,23 @@ pragma solidity ^0.8.20; import "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {IERC5805} from "@openzeppelin/contracts/interfaces/IERC5805.sol"; -import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; -import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; +import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; -import "@openzeppelin/contracts/access/AccessControl.sol"; +import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol"; import "@openzeppelin/contracts/interfaces/IERC5805.sol"; -import "./IPersonaNft.sol"; +import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; +import "./IAgentNft.sol"; import "./CoreRegistry.sol"; import "./ValidatorRegistry.sol"; -import "./IPersonaDAO.sol"; - -contract PersonaNft is - IPersonaNft, - ERC721, - ERC721URIStorage, - AccessControl, +import "./IAgentDAO.sol"; + +contract AgentNft is + IAgentNft, + Initializable, + ERC721Upgradeable, + ERC721URIStorageUpgradeable, + AccessControlUpgradeable, CoreRegistry, ValidatorRegistry { @@ -47,17 +49,15 @@ contract PersonaNft is address private _contributionNft; address private _serviceNft; - constructor( - address defaultAdmin - ) - ERC721("Persona", "PERSONA") - CoreRegistry() - ValidatorRegistry( + function initialize(address defaultAdmin) public initializer { + __ERC721_init("Persona", "PERSONA"); + __CoreRegistry_init(); + __ValidatorRegistry_init( _validatorScoreOf, _totalVirtualProposals, _getPastValidatorScore - ) - { + ); + __AccessControl_init(); _grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin); _grantRole(VALIDATOR_ADMIN_ROLE, defaultAdmin); _nextVirtualId = 1; @@ -124,7 +124,7 @@ contract PersonaNft is address account ) internal view returns (uint256) { VirtualInfo memory info = virtualInfos[virtualId]; - IPersonaDAO dao = IPersonaDAO(info.dao); + IAgentDAO dao = IAgentDAO(info.dao); return dao.scoreOf(account); } @@ -134,7 +134,7 @@ contract PersonaNft is uint256 timepoint ) internal view returns (uint256) { VirtualInfo memory info = virtualInfos[virtualId]; - IPersonaDAO dao = IPersonaDAO(info.dao); + IAgentDAO dao = IAgentDAO(info.dao); return dao.getPastScore(account, timepoint); } @@ -142,7 +142,7 @@ contract PersonaNft is uint256 virtualId ) internal view returns (uint256) { VirtualInfo memory info = virtualInfos[virtualId]; - IPersonaDAO dao = IPersonaDAO(info.dao); + IAgentDAO dao = IAgentDAO(info.dao); return dao.proposalCount(); } @@ -216,7 +216,12 @@ contract PersonaNft is function tokenURI( uint256 tokenId - ) public view override(ERC721, ERC721URIStorage) returns (string memory) { + ) + public + view + override(ERC721Upgradeable, ERC721URIStorageUpgradeable) + returns (string memory) + { return super.tokenURI(tokenId); } @@ -225,7 +230,11 @@ contract PersonaNft is ) public view - override(ERC721, ERC721URIStorage, AccessControl) + override( + ERC721Upgradeable, + ERC721URIStorageUpgradeable, + AccessControlUpgradeable + ) returns (bool) { return super.supportsInterface(interfaceId); diff --git a/contracts/virtualPersona/PersonaToken.sol b/contracts/virtualPersona/AgentToken.sol similarity index 95% rename from contracts/virtualPersona/PersonaToken.sol rename to contracts/virtualPersona/AgentToken.sol index a84b164..6e8375f 100644 --- a/contracts/virtualPersona/PersonaToken.sol +++ b/contracts/virtualPersona/AgentToken.sol @@ -5,11 +5,11 @@ import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {Checkpoints} from "@openzeppelin/contracts/utils/structs/Checkpoints.sol"; -import "./IPersonaToken.sol"; -import "./IPersonaNft.sol"; +import "./IAgentToken.sol"; +import "./IAgentNft.sol"; import "./ERC20Votes.sol"; -contract PersonaToken is IPersonaToken, ERC20Upgradeable, ERC20Votes { +contract AgentToken is IAgentToken, ERC20Upgradeable, ERC20Votes { using SafeERC20 for IERC20; using Checkpoints for Checkpoints.Trace208; @@ -23,7 +23,7 @@ contract PersonaToken is IPersonaToken, ERC20Upgradeable, ERC20Votes { } modifier canDelegate(address target) { - IPersonaNft registry = IPersonaNft(virtualNft); + IAgentNft registry = IAgentNft(virtualNft); uint256 virtualId = registry.stakingTokenToVirtualId(address(this)); require( registry.isValidator(virtualId, target), diff --git a/contracts/virtualPersona/CoreRegistry.sol b/contracts/virtualPersona/CoreRegistry.sol index 6aab64c..c33595e 100644 --- a/contracts/virtualPersona/CoreRegistry.sol +++ b/contracts/virtualPersona/CoreRegistry.sol @@ -1,20 +1,22 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.20; -abstract contract CoreRegistry { +import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; + +abstract contract CoreRegistry is Initializable { mapping(uint8 => string) public coreTypes; uint8 _nextCoreType; event NewCoreType(uint8 coreType, string label); - constructor() { + function __CoreRegistry_init() internal onlyInitializing { coreTypes[_nextCoreType++] = "Cognitive Core"; coreTypes[_nextCoreType++] = "Voice and Sound Core"; coreTypes[_nextCoreType++] = "Visual Core"; coreTypes[_nextCoreType++] = "Domain Expertise Core"; } - function _addCoreType(string memory label) internal { + function _addCoreType(string memory label) internal { uint8 coreType = _nextCoreType++; coreTypes[coreType] = label; emit NewCoreType(coreType, label); diff --git a/contracts/virtualPersona/IPersonaDAO.sol b/contracts/virtualPersona/IAgentDAO.sol similarity index 97% rename from contracts/virtualPersona/IPersonaDAO.sol rename to contracts/virtualPersona/IAgentDAO.sol index cb7ac8e..6820721 100644 --- a/contracts/virtualPersona/IPersonaDAO.sol +++ b/contracts/virtualPersona/IAgentDAO.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.20; import "@openzeppelin/contracts/governance/utils/IVotes.sol"; import "@openzeppelin/contracts/governance/IGovernor.sol"; -interface IPersonaDAO { +interface IAgentDAO { function initialize( string memory name, IVotes token, diff --git a/contracts/virtualPersona/IPersonaNft.sol b/contracts/virtualPersona/IAgentNft.sol similarity index 96% rename from contracts/virtualPersona/IPersonaNft.sol rename to contracts/virtualPersona/IAgentNft.sol index 922d30b..c246de9 100644 --- a/contracts/virtualPersona/IPersonaNft.sol +++ b/contracts/virtualPersona/IAgentNft.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.20; import "./IValidatorRegistry.sol"; -interface IPersonaNft is IValidatorRegistry { +interface IAgentNft is IValidatorRegistry { struct VirtualInfo { address dao; // Persona DAO can update the persona metadata address token; diff --git a/contracts/virtualPersona/IPersonaToken.sol b/contracts/virtualPersona/IAgentToken.sol similarity index 96% rename from contracts/virtualPersona/IPersonaToken.sol rename to contracts/virtualPersona/IAgentToken.sol index f67bb0d..1eedcae 100644 --- a/contracts/virtualPersona/IPersonaToken.sol +++ b/contracts/virtualPersona/IAgentToken.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.20; -interface IPersonaToken { +interface IAgentToken { function initialize( string memory name, string memory symbol, diff --git a/contracts/virtualPersona/ValidatorRegistry.sol b/contracts/virtualPersona/ValidatorRegistry.sol index 0642ce9..e4612ea 100644 --- a/contracts/virtualPersona/ValidatorRegistry.sol +++ b/contracts/virtualPersona/ValidatorRegistry.sol @@ -1,26 +1,26 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.20; +import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "./IValidatorRegistry.sol"; -abstract contract ValidatorRegistry is IValidatorRegistry { +abstract contract ValidatorRegistry is IValidatorRegistry, Initializable { mapping(uint256 virtualId => mapping(address account => bool isValidator)) private _validatorsMap; mapping(address account => mapping(uint256 virtualId => uint256 score)) private _baseValidatorScore; mapping(uint256 virtualId => address[] validators) private _validators; - function(uint256, address) view returns (uint256) - private immutable _getScoreOf; - function(uint256) view returns (uint256) private immutable _getMaxScore; + function(uint256, address) view returns (uint256) private _getScoreOf; + function(uint256) view returns (uint256) private _getMaxScore; function(uint256, address, uint256) view returns (uint256) - private immutable _getPastScore; + private _getPastScore; - constructor( + function __ValidatorRegistry_init( function(uint256, address) view returns (uint256) getScoreOf_, function(uint256) view returns (uint256) getMaxScore_, function(uint256, address, uint256) view returns (uint256) getPastScore_ - ) { + ) internal onlyInitializing { _getScoreOf = getScoreOf_; _getMaxScore = getMaxScore_; _getPastScore = getPastScore_; diff --git a/scripts/deployContributions.ts b/scripts/deployContributions.ts index c3c9a89..94cb3e8 100644 --- a/scripts/deployContributions.ts +++ b/scripts/deployContributions.ts @@ -1,20 +1,22 @@ -import { ethers } from "hardhat"; +import { ethers, upgrades } from "hardhat"; (async () => { try { - const contribution = await ethers.deployContract("ContributionNft", [ + const Contribution = await ethers.getContractFactory("ContributionNft"); + const contribution = await upgrades.deployProxy(Contribution, [ process.env.VIRTUAL_NFT, ]); console.log("ContributionNft deployed to:", contribution.target); - const service = await ethers.deployContract("ServiceNft", [ + const Service = await ethers.getContractFactory("ServiceNft"); + const service = await upgrades.deployProxy(Service, [ process.env.VIRTUAL_NFT, contribution.target, ]); console.log("ServiceNft deployed to:", service.target); const nft = await ethers.getContractAt( - "PersonaNft", + "AgentNft", process.env.VIRTUAL_NFT ); await nft.setContributionService(contribution.target, service.target); diff --git a/scripts/deployPersonaFactory.ts b/scripts/deployPersonaFactory.ts index 8874715..c6c6b81 100644 --- a/scripts/deployPersonaFactory.ts +++ b/scripts/deployPersonaFactory.ts @@ -3,15 +3,15 @@ const deployParams = require("./arguments/personaFactoryArguments.js"); (async () => { try { - const PersonaFactory = await ethers.getContractFactory("PersonaFactory"); - const factory = await upgrades.deployProxy(PersonaFactory, deployParams); + const AgentFactory = await ethers.getContractFactory("AgentFactory"); + const factory = await upgrades.deployProxy(AgentFactory, deployParams); await factory.waitForDeployment(); - console.log("PersonaFactory deployed to:", factory.target); + console.log("AgentFactory deployed to:", factory.target); // Grant factory to mint NFTs - const PersonaNft = await ethers.getContractFactory("PersonaNft"); - const nft = PersonaNft.attach(process.env.VIRTUAL_NFT); + const AgentNft = await ethers.getContractFactory("AgentNft"); + const nft = AgentNft.attach(process.env.VIRTUAL_NFT); await nft.grantRole(ethers.id("MINTER_ROLE"), factory.target); diff --git a/scripts/deployReward.ts b/scripts/deployReward.ts index 5dd338e..eed3437 100644 --- a/scripts/deployReward.ts +++ b/scripts/deployReward.ts @@ -2,7 +2,7 @@ import { ethers, upgrades } from "hardhat"; (async () => { try { - const Contract = await ethers.getContractFactory("PersonaReward"); + const Contract = await ethers.getContractFactory("AgentReward"); const contract = await upgrades.deployProxy(Contract, [ process.env.ASSET_TOKEN, process.env.VIRTUAL_NFT, @@ -22,7 +22,7 @@ import { ethers, upgrades } from "hardhat"; ]); await contract.waitForDeployment(); - console.log("PersonaReward deployed to:", contract.target); + console.log("AgentReward deployed to:", contract.target); } catch (e) { console.log(e); } diff --git a/scripts/deployVirtualImplementations.ts b/scripts/deployVirtualImplementations.ts index 884ef99..5cc10e8 100644 --- a/scripts/deployVirtualImplementations.ts +++ b/scripts/deployVirtualImplementations.ts @@ -2,13 +2,13 @@ import { ethers } from "hardhat"; (async () => { try { - const dao = await ethers.deployContract("PersonaDAO"); + const dao = await ethers.deployContract("AgentDAO"); await dao.waitForDeployment(); - console.log("PersonaDAO deployed to:", dao.target); + console.log("AgentDAO deployed to:", dao.target); - const token = await ethers.deployContract("PersonaToken"); + const token = await ethers.deployContract("AgentToken"); await token.waitForDeployment(); - console.log("PersonaToken deployed to:", token.target); + console.log("AgentToken deployed to:", token.target); } catch (e) { console.log(e); } diff --git a/scripts/deployVirtualNft.ts b/scripts/deployVirtualNft.ts index c32d0f4..4135a80 100644 --- a/scripts/deployVirtualNft.ts +++ b/scripts/deployVirtualNft.ts @@ -1,9 +1,10 @@ -import { ethers } from "hardhat"; +import { ethers, upgrades } from "hardhat"; (async () => { try { - const nft = await ethers.deployContract("PersonaNft", [process.env.DEPLOYER]); - console.log("PersonaNft deployed to:", nft.target); + const AgentNft = await ethers.getContractFactory("ServiceNft"); + const nft = await upgrades.deployProxy(AgentNft, [process.env.DEPLOYER]); + console.log("AgentNft deployed to:", nft.target); } catch (e) { console.log(e); } diff --git a/scripts/upgradeFactory.ts b/scripts/upgradeFactory.ts index e8d00dd..0ecc4a9 100644 --- a/scripts/upgradeFactory.ts +++ b/scripts/upgradeFactory.ts @@ -2,10 +2,10 @@ import { ethers, upgrades } from "hardhat"; (async () => { try { - const PersonaFactory = await ethers.getContractFactory("PersonaFactory"); + const AgentFactory = await ethers.getContractFactory("AgentFactory"); const factory = await upgrades.upgradeProxy( process.env.VIRTUAL_FACTORY, - PersonaFactory + AgentFactory ); await factory.setImplementations( process.env.VIRTUAL_TOKEN_IMPL, diff --git a/scripts/upgradeRewards.ts b/scripts/upgradeRewards.ts index 97d91f4..6ef7d56 100644 --- a/scripts/upgradeRewards.ts +++ b/scripts/upgradeRewards.ts @@ -2,7 +2,7 @@ import { ethers, upgrades } from "hardhat"; (async () => { try { - const Contract = await ethers.getContractFactory("PersonaReward"); + const Contract = await ethers.getContractFactory("AgentReward"); const contract = await upgrades.upgradeProxy(process.env.PERSONA_REWARD, Contract); console.log("Upgraded", contract.target) } catch (e) { diff --git a/test/contribution.js b/test/contribution.js index c08bca3..7b7f7d6 100644 --- a/test/contribution.js +++ b/test/contribution.js @@ -2,8 +2,8 @@ We will test the end-to-end implementation of a Contribution flow till Service. 1. Prepare 100k tokens -2. Propose a new Persona at PersonaFactory -3. Once received proposalId from PersonaFactory, create a proposal at ProtocolDAO +2. Propose a new Persona at AgentFactory +3. Once received proposalId from AgentFactory, create a proposal at ProtocolDAO 4. Vote on the proposal 5. Execute the proposal */ @@ -61,19 +61,19 @@ describe("Contribution", function () { ); await protocolDAO.waitForDeployment(); - const personaNft = await ethers.deployContract("PersonaNft", [ + const personaNft = await ethers.deployContract("AgentNft", [ deployer.address, ]); await personaNft.waitForDeployment(); - const personaToken = await ethers.deployContract("PersonaToken"); + const personaToken = await ethers.deployContract("AgentToken"); await personaToken.waitForDeployment(); - const personaDAO = await ethers.deployContract("PersonaDAO"); + const personaDAO = await ethers.deployContract("AgentDAO"); await personaDAO.waitForDeployment(); const tba = await ethers.deployContract("ERC6551Registry"); - const personaFactory = await ethers.deployContract("PersonaFactory"); + const personaFactory = await ethers.deployContract("AgentFactory"); await personaFactory.initialize( personaToken.target, personaDAO.target, @@ -197,7 +197,7 @@ describe("Contribution", function () { const { persona, personaNft, service, demoToken } = base; const descHash = getDescHash(CONTRIBUTION_DESC); - const personaDaoContract = await ethers.getContractFactory("PersonaDAO"); + const personaDaoContract = await ethers.getContractFactory("AgentDAO"); const mintCalldata = await getMintServiceCalldata( service, persona.virtualId, @@ -218,7 +218,7 @@ describe("Contribution", function () { await personaNft.addValidator(persona.virtualId, validator2.address); await personaNft.addValidator(persona.virtualId, validator3.address); const tokenInstance = await ethers.getContractAt( - "PersonaToken", + "AgentToken", persona.token ); await tokenInstance @@ -288,7 +288,7 @@ describe("Contribution", function () { "0x0000000000000000000000000000000000000000", true ); - const personaDAO = await ethers.getContractAt("PersonaDAO", persona.dao); + const personaDAO = await ethers.getContractAt("AgentDAO", persona.dao); // We need 51% to reach quorum const voteParams = abi.encode( ["uint256", "uint8[] memory"], @@ -324,7 +324,7 @@ describe("Contribution", function () { "0x0000000000000000000000000000000000000000", true ); - const personaDAO = await ethers.getContractAt("PersonaDAO", persona.dao); + const personaDAO = await ethers.getContractAt("AgentDAO", persona.dao); /* Scenario: 1. Validator1 with 100000 votes set maturity score to 1500 @@ -334,7 +334,7 @@ describe("Contribution", function () { */ const [validator1, validator2, validator3] = this.signers; const personaToken = await ethers.getContractAt( - "PersonaToken", + "AgentToken", persona.token ); expect( @@ -390,7 +390,7 @@ describe("Contribution", function () { "0x0000000000000000000000000000000000000000", true ); - const personaDAO = await ethers.getContractAt("PersonaDAO", persona.dao); + const personaDAO = await ethers.getContractAt("AgentDAO", persona.dao); /* Scenario: Continuing from previous test case, the first service NFT has maturity score of 2090 and we are improving it to 4000, the impact should be 4000-2090 = 1910 @@ -431,7 +431,7 @@ describe("Contribution", function () { // Proposal 2 const descHash = getDescHash(CONTRIBUTION_DESC + " V2"); - const personaDaoContract = await ethers.getContractFactory("PersonaDAO"); + const personaDaoContract = await ethers.getContractFactory("AgentDAO"); const mintCalldata = await getMintServiceCalldata( service, persona.virtualId, @@ -486,7 +486,7 @@ describe("Contribution", function () { const { persona, proposalId, service, contribution } = await loadFixture( proposeContribution ); - const personaDAO = await ethers.getContractAt("PersonaDAO", persona.dao); + const personaDAO = await ethers.getContractAt("AgentDAO", persona.dao); await contribution.setAdmin(signers[15].address); await expect( personaDAO diff --git a/test/delegate.js b/test/delegate.js index dffd1d6..1a7ba93 100644 --- a/test/delegate.js +++ b/test/delegate.js @@ -54,7 +54,7 @@ describe("Delegation", function () { ); await protocolDAO.waitForDeployment(); - const personaNft = await ethers.deployContract("PersonaNft", [ + const personaNft = await ethers.deployContract("AgentNft", [ deployer.address, ]); await personaNft.waitForDeployment(); @@ -76,14 +76,14 @@ describe("Delegation", function () { service.target ); - const personaToken = await ethers.deployContract("PersonaToken"); + const personaToken = await ethers.deployContract("AgentToken"); await personaToken.waitForDeployment(); - const personaDAO = await ethers.deployContract("PersonaDAO"); + const personaDAO = await ethers.deployContract("AgentDAO"); await personaDAO.waitForDeployment(); const tba = await ethers.deployContract("ERC6551Registry"); - const personaFactory = await ethers.deployContract("PersonaFactory"); + const personaFactory = await ethers.deployContract("AgentFactory"); await personaFactory.initialize( personaToken.target, personaDAO.target, @@ -151,7 +151,7 @@ describe("Delegation", function () { const persona = { virtualId, token, dao }; const personaTokenContract = await ethers.getContractAt( - "PersonaToken", + "AgentToken", persona.token ); return { personaTokenContract }; diff --git a/test/rewards.js b/test/rewards.js index 074a6a8..98b491b 100644 --- a/test/rewards.js +++ b/test/rewards.js @@ -85,19 +85,19 @@ describe("Rewards", function () { ); await protocolDAO.waitForDeployment(); - const personaNft = await ethers.deployContract("PersonaNft", [ + const personaNft = await ethers.deployContract("AgentNft", [ deployer.address, ]); await personaNft.waitForDeployment(); - const personaToken = await ethers.deployContract("PersonaToken"); + const personaToken = await ethers.deployContract("AgentToken"); await personaToken.waitForDeployment(); - const personaDAO = await ethers.deployContract("PersonaDAO"); + const personaDAO = await ethers.deployContract("AgentDAO"); await personaDAO.waitForDeployment(); const tba = await ethers.deployContract("ERC6551Registry"); - const personaFactory = await ethers.deployContract("PersonaFactory"); + const personaFactory = await ethers.deployContract("AgentFactory"); await personaFactory.initialize( personaToken.target, personaDAO.target, @@ -115,7 +115,7 @@ describe("Rewards", function () { personaFactory.target ); - const reward = await ethers.deployContract("PersonaReward", [], {}); + const reward = await ethers.deployContract("AgentReward", [], {}); await reward.waitForDeployment(); const contributionNft = await ethers.deployContract( @@ -229,7 +229,7 @@ describe("Rewards", function () { const signers = await ethers.getSigners(); const [validator1, staker1, validator2, staker2] = signers; const base = await deployGenesisVirtual(); - const Token = await ethers.getContractFactory("PersonaToken"); + const Token = await ethers.getContractFactory("AgentToken"); const token = Token.attach(base.persona.token); const { persona, demoToken, personaNft, reward } = base; // Staking @@ -253,7 +253,7 @@ describe("Rewards", function () { .stake(STAKE_AMOUNTS[3], staker2.address, validator2.address); // Propose & validate - const Dao = await ethers.getContractFactory("PersonaDAO"); + const Dao = await ethers.getContractFactory("AgentDAO"); const dao = Dao.attach(persona.dao); const proposals = await Promise.all([ @@ -294,7 +294,7 @@ describe("Rewards", function () { ) { const signers = await ethers.getSigners(); const { persona, serviceNft, contributionNft } = base; - const personaDAO = await ethers.getContractAt("PersonaDAO", persona.dao); + const personaDAO = await ethers.getContractAt("AgentDAO", persona.dao); const descHash = getDescHash(desc); diff --git a/test/virtualGenesis.js b/test/virtualGenesis.js index 8b812ca..bea4753 100644 --- a/test/virtualGenesis.js +++ b/test/virtualGenesis.js @@ -2,8 +2,8 @@ We will test the end-to-end implementation of a Virtual genesis initiation 1. Prepare 100k tokens -2. Propose a new Persona at PersonaFactory -3. Once received proposalId from PersonaFactory, create a proposal at ProtocolDAO +2. Propose a new Persona at AgentFactory +3. Once received proposalId from AgentFactory, create a proposal at ProtocolDAO 4. Vote on the proposal 5. Execute the proposal */ @@ -18,7 +18,7 @@ const getExecuteCallData = (factory, proposalId) => { return factory.interface.encodeFunctionData("executeApplication", [proposalId]); }; -describe("PersonaFactory", function () { +describe("AgentFactory", function () { const PROPOSAL_THRESHOLD = parseEther("100000"); const QUORUM = parseEther("10000"); const PROTOCOL_DAO_VOTING_PERIOD = 300; @@ -60,7 +60,7 @@ describe("PersonaFactory", function () { ); await protocolDAO.waitForDeployment(); - const personaNft = await ethers.deployContract("PersonaNft", [ + const personaNft = await ethers.deployContract("AgentNft", [ deployer.address, ]); await personaNft.waitForDeployment(); @@ -82,14 +82,14 @@ describe("PersonaFactory", function () { service.target ); - const personaToken = await ethers.deployContract("PersonaToken"); + const personaToken = await ethers.deployContract("AgentToken"); await personaToken.waitForDeployment(); - const personaDAO = await ethers.deployContract("PersonaDAO"); + const personaDAO = await ethers.deployContract("AgentDAO"); await personaDAO.waitForDeployment(); const tba = await ethers.deployContract("ERC6551Registry"); - const personaFactory = await ethers.deployContract("PersonaFactory"); + const personaFactory = await ethers.deployContract("AgentFactory"); await personaFactory.initialize( personaToken.target, personaDAO.target, @@ -291,8 +291,8 @@ describe("PersonaFactory", function () { expect(firstToken).to.not.equal(ethers.ZeroAddress); expect(firstDao).to.not.equal(ethers.ZeroAddress); - const PersonaDAO = await ethers.getContractFactory("PersonaDAO"); - const daoInstance = PersonaDAO.attach(dao); + const AgentDAO = await ethers.getContractFactory("AgentDAO"); + const daoInstance = AgentDAO.attach(dao); expect(await daoInstance.token()).to.equal(token); expect(await daoInstance.name()).to.equal(genesisInput.daoName); expect(await daoInstance.proposalThreshold()).to.equal( @@ -302,8 +302,8 @@ describe("PersonaFactory", function () { genesisInput.daoVotingPeriod ); - const PersonaToken = await ethers.getContractFactory("PersonaToken"); - const tokenInstance = PersonaToken.attach(token); + const AgentToken = await ethers.getContractFactory("AgentToken"); + const tokenInstance = AgentToken.attach(token); expect(await tokenInstance.name()).to.equal(genesisInput.name); expect(await tokenInstance.symbol()).to.equal(genesisInput.symbol); @@ -328,8 +328,8 @@ describe("PersonaFactory", function () { const [validator, staker] = this.accounts; const { persona, demoToken } = await loadFixture(deployGenesisVirtual); - const PersonaToken = await ethers.getContractFactory("PersonaToken"); - const tokenInstance = PersonaToken.attach(persona.token); + const AgentToken = await ethers.getContractFactory("AgentToken"); + const tokenInstance = AgentToken.attach(persona.token); // Prepare tokens for staking // The validatory should have 100k sToken initially because of the initiation stake expect(await demoToken.balanceOf(validator)).to.be.equal(0n); @@ -367,8 +367,8 @@ describe("PersonaFactory", function () { it("should not allow staking and delegate to non-validator", async function () { const [validator, staker] = this.accounts; const { persona, demoToken } = await loadFixture(deployGenesisVirtual); - const PersonaToken = await ethers.getContractFactory("PersonaToken"); - const tokenInstance = PersonaToken.attach(persona.token); + const AgentToken = await ethers.getContractFactory("AgentToken"); + const tokenInstance = AgentToken.attach(persona.token); await demoToken.mint(staker, QUORUM); const stakeAmount = parseEther("100"); @@ -385,8 +385,8 @@ describe("PersonaFactory", function () { const { persona, demoToken, personaNft } = await loadFixture( deployGenesisVirtual ); - const PersonaToken = await ethers.getContractFactory("PersonaToken"); - const tokenInstance = PersonaToken.attach(persona.token); + const AgentToken = await ethers.getContractFactory("AgentToken"); + const tokenInstance = AgentToken.attach(persona.token); await demoToken.mint(staker, QUORUM); const stakeAmount = parseEther("100"); @@ -408,8 +408,8 @@ describe("PersonaFactory", function () { const [validator, staker] = this.accounts; const { persona, demoToken, personaNft, personaFactory } = await loadFixture(deployGenesisVirtual); - const PersonaDAO = await ethers.getContractFactory("PersonaDAO"); - const personaDAO = PersonaDAO.attach(persona.dao); + const AgentDAO = await ethers.getContractFactory("AgentDAO"); + const personaDAO = AgentDAO.attach(persona.dao); expect( await personaNft.validatorScore(persona.virtualId, validator) ).to.be.equal(0n); @@ -460,8 +460,8 @@ describe("PersonaFactory", function () { const [validator, validator2] = this.accounts; const { persona, demoToken, personaNft, personaFactory } = await loadFixture(deployGenesisVirtual); - const PersonaDAO = await ethers.getContractFactory("PersonaDAO"); - const personaDAO = PersonaDAO.attach(persona.dao); + const AgentDAO = await ethers.getContractFactory("AgentDAO"); + const personaDAO = AgentDAO.attach(persona.dao); // First proposal await personaDAO.propose([validator], [0], ["0x"], "First proposal");