diff --git a/.gitignore b/.gitignore index bbc14fc..0a4ab8f 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,6 @@ cache/ artifacts/ deployments fireblocks_secret.key -.cursor/ \ No newline at end of file +.cursor/ + +env* \ No newline at end of file diff --git a/.openzeppelin/base.json b/.openzeppelin/base.json index d7c30b2..476f119 100644 --- a/.openzeppelin/base.json +++ b/.openzeppelin/base.json @@ -77,7 +77,6 @@ }, { "address": "0x42f4f5A3389CA0BeD694dE339f4d432aCdDb1Ea9", - "txHash": "0x11c9124c75729b48cbb255ef9915757108841fb69588c8c9351b0fabeec48f1b", "kind": "transparent" } ], @@ -9415,6 +9414,472 @@ ] } } + }, + "1ed731a922c49874b6d67efa5d294e20f44dcd09c4dc7cdf0869e6ae997604b0": { + "address": "0x0d6A067748e715A8256DE8081e7186ba6Fc2E44D", + "txHash": "0x8362587c683fa98c7f95062e4e0580035befaa27f15420457a2ab17b4e7e3828", + "layout": { + "solcVersion": "0.8.26", + "storage": [ + { + "label": "params", + "offset": 0, + "slot": "0", + "type": "t_struct(Params)9195_storage", + "contract": "FGenesis", + "src": "contracts/genesis/FGenesis.sol:33" + }, + { + "label": "genesisContracts", + "offset": 0, + "slot": "12", + "type": "t_mapping(t_uint256,t_address)", + "contract": "FGenesis", + "src": "contracts/genesis/FGenesis.sol:34" + }, + { + "label": "genesisID", + "offset": 0, + "slot": "13", + "type": "t_uint256", + "contract": "FGenesis", + "src": "contracts/genesis/FGenesis.sol:35" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)24_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_struct(AccessControlStorage)34_storage": { + "label": "struct AccessControlUpgradeable.AccessControlStorage", + "members": [ + { + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)24_storage)", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(InitializableStorage)377_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_struct(RoleData)24_storage": { + "label": "struct AccessControlUpgradeable.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_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_mapping(t_uint256,t_address)": { + "label": "mapping(uint256 => address)", + "numberOfBytes": "32" + }, + "t_struct(Params)9195_storage": { + "label": "struct FGenesis.Params", + "members": [ + { + "label": "virtualToken", + "type": "t_address", + "offset": 0, + "slot": "0" + }, + { + "label": "reserve", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "maxContribution", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "feeAddr", + "type": "t_address", + "offset": 0, + "slot": "3" + }, + { + "label": "feeAmt", + "type": "t_uint256", + "offset": 0, + "slot": "4" + }, + { + "label": "duration", + "type": "t_uint256", + "offset": 0, + "slot": "5" + }, + { + "label": "tbaSalt", + "type": "t_bytes32", + "offset": 0, + "slot": "6" + }, + { + "label": "tbaImpl", + "type": "t_address", + "offset": 0, + "slot": "7" + }, + { + "label": "votePeriod", + "type": "t_uint32", + "offset": 20, + "slot": "7" + }, + { + "label": "threshold", + "type": "t_uint256", + "offset": 0, + "slot": "8" + }, + { + "label": "agentFactory", + "type": "t_address", + "offset": 0, + "slot": "9" + }, + { + "label": "agentTokenTotalSupply", + "type": "t_uint256", + "offset": 0, + "slot": "10" + }, + { + "label": "agentTokenLpSupply", + "type": "t_uint256", + "offset": 0, + "slot": "11" + } + ], + "numberOfBytes": "384" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "label": "uint32", + "numberOfBytes": "4" + } + }, + "namespaces": { + "erc7201:openzeppelin.storage.AccessControl": [ + { + "contract": "AccessControlUpgradeable", + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)24_storage)", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:61", + "offset": 0, + "slot": "0" + } + ], + "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" + } + ] + } + } + }, + "41e8e612857277c4df3d9a94fffb3091421f417cf067719ba7726b2cb739cb2f": { + "address": "0x90833E6eE42515B037df22Ec411a0f57A87BA438", + "txHash": "0xceb604244c309a80e8c75b1672003f296e531a30435df4bd3620c75a4735d1d8", + "layout": { + "solcVersion": "0.8.26", + "storage": [ + { + "label": "params", + "offset": 0, + "slot": "0", + "type": "t_struct(Params)2037_storage", + "contract": "FGenesis", + "src": "contracts/genesis/FGenesis.sol:32" + }, + { + "label": "genesisContracts", + "offset": 0, + "slot": "12", + "type": "t_mapping(t_uint256,t_address)", + "contract": "FGenesis", + "src": "contracts/genesis/FGenesis.sol:33" + }, + { + "label": "genesisID", + "offset": 0, + "slot": "13", + "type": "t_uint256", + "contract": "FGenesis", + "src": "contracts/genesis/FGenesis.sol:34" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)24_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_struct(AccessControlStorage)34_storage": { + "label": "struct AccessControlUpgradeable.AccessControlStorage", + "members": [ + { + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)24_storage)", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(InitializableStorage)145_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_struct(RoleData)24_storage": { + "label": "struct AccessControlUpgradeable.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_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_mapping(t_uint256,t_address)": { + "label": "mapping(uint256 => address)", + "numberOfBytes": "32" + }, + "t_struct(Params)2037_storage": { + "label": "struct FGenesis.Params", + "members": [ + { + "label": "virtualToken", + "type": "t_address", + "offset": 0, + "slot": "0" + }, + { + "label": "reserve", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "maxContribution", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "feeAddr", + "type": "t_address", + "offset": 0, + "slot": "3" + }, + { + "label": "feeAmt", + "type": "t_uint256", + "offset": 0, + "slot": "4" + }, + { + "label": "duration", + "type": "t_uint256", + "offset": 0, + "slot": "5" + }, + { + "label": "tbaSalt", + "type": "t_bytes32", + "offset": 0, + "slot": "6" + }, + { + "label": "tbaImpl", + "type": "t_address", + "offset": 0, + "slot": "7" + }, + { + "label": "votePeriod", + "type": "t_uint32", + "offset": 20, + "slot": "7" + }, + { + "label": "threshold", + "type": "t_uint256", + "offset": 0, + "slot": "8" + }, + { + "label": "agentFactory", + "type": "t_address", + "offset": 0, + "slot": "9" + }, + { + "label": "agentTokenTotalSupply", + "type": "t_uint256", + "offset": 0, + "slot": "10" + }, + { + "label": "agentTokenLpSupply", + "type": "t_uint256", + "offset": 0, + "slot": "11" + } + ], + "numberOfBytes": "384" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "label": "uint32", + "numberOfBytes": "4" + } + }, + "namespaces": { + "erc7201:openzeppelin.storage.AccessControl": [ + { + "contract": "AccessControlUpgradeable", + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)24_storage)", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:61", + "offset": 0, + "slot": "0" + } + ], + "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/.openzeppelin/mainnet.json b/.openzeppelin/mainnet.json new file mode 100644 index 0000000..7509f3f --- /dev/null +++ b/.openzeppelin/mainnet.json @@ -0,0 +1,686 @@ +{ + "manifestVersion": "3.2", + "proxies": [ + { + "address": "0x24a6cb367148eBBED3f4926cAA4942C070632C3F", + "txHash": "0xddd4c2fbec5cd5f31dbad1e04caa7f4999cd782549a3933294dfdbd3d077ee98", + "kind": "transparent" + }, + { + "address": "0x0c3cf6bF9FAFFA39a8A9B6891e1777A898bB5754", + "txHash": "0x6a5c9ae39ba91d6847c77da0eb44de6da93374cecd745029e3e9c177c6d57f73", + "kind": "transparent" + }, + { + "address": "0xae459175C2A27C7A6204bAfc906e61424d4b159C", + "txHash": "0x783a0f29886cf63f539b701e167888490b8531f794535087b0688adfe434c1da", + "kind": "transparent" + } + ], + "impls": { + "8cd3fb5f36897dbf98d43921ecff3fd3951a1b3db5a4c7fba9e7ab1aa566a00f": { + "address": "0x9D26F50810aDd0C0abde55E696fdB19Eb1cc3b63", + "txHash": "0x84f5669d5167f639c996706de55d181300f88379996eefb598922231716c0d6a", + "layout": { + "solcVersion": "0.8.26", + "storage": [ + { + "label": "_roles", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_struct(RoleData)7974_storage)", + "contract": "AccessControl", + "src": "@openzeppelin/contracts/access/AccessControl.sol:55" + }, + { + "label": "tokenImplementation", + "offset": 0, + "slot": "1", + "type": "t_address", + "contract": "SimpleAgentFactory", + "src": "contracts/virtualPersona/EthAgentFactory.sol:25" + }, + { + "label": "assetToken", + "offset": 0, + "slot": "2", + "type": "t_address", + "contract": "SimpleAgentFactory", + "src": "contracts/virtualPersona/EthAgentFactory.sol:27" + }, + { + "label": "_vault", + "offset": 0, + "slot": "3", + "type": "t_address", + "contract": "SimpleAgentFactory", + "src": "contracts/virtualPersona/EthAgentFactory.sol:29" + }, + { + "label": "_tokenAdmin", + "offset": 0, + "slot": "4", + "type": "t_address", + "contract": "SimpleAgentFactory", + "src": "contracts/virtualPersona/EthAgentFactory.sol:31" + }, + { + "label": "locked", + "offset": 20, + "slot": "4", + "type": "t_bool", + "contract": "SimpleAgentFactory", + "src": "contracts/virtualPersona/EthAgentFactory.sol:33" + }, + { + "label": "allTradingTokens", + "offset": 0, + "slot": "5", + "type": "t_array(t_address)dyn_storage", + "contract": "SimpleAgentFactory", + "src": "contracts/virtualPersona/EthAgentFactory.sol:45" + }, + { + "label": "_uniswapRouter", + "offset": 0, + "slot": "6", + "type": "t_address", + "contract": "SimpleAgentFactory", + "src": "contracts/virtualPersona/EthAgentFactory.sol:46" + }, + { + "label": "_tokenSupplyParams", + "offset": 0, + "slot": "7", + "type": "t_bytes_storage", + "contract": "SimpleAgentFactory", + "src": "contracts/virtualPersona/EthAgentFactory.sol:49" + }, + { + "label": "_tokenTaxParams", + "offset": 0, + "slot": "8", + "type": "t_bytes_storage", + "contract": "SimpleAgentFactory", + "src": "contracts/virtualPersona/EthAgentFactory.sol:50" + }, + { + "label": "_tokenMultiplier", + "offset": 0, + "slot": "9", + "type": "t_uint16", + "contract": "SimpleAgentFactory", + "src": "contracts/virtualPersona/EthAgentFactory.sol:51" + }, + { + "label": "_existingAgents", + "offset": 0, + "slot": "10", + "type": "t_mapping(t_address,t_bool)", + "contract": "SimpleAgentFactory", + "src": "contracts/virtualPersona/EthAgentFactory.sol:55" + } + ], + "types": { + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_struct(InitializableStorage)1512_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_struct(PausableStorage)2462_storage": { + "label": "struct PausableUpgradeable.PausableStorage", + "members": [ + { + "label": "_paused", + "type": "t_bool", + "offset": 0, + "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_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_bytes_storage": { + "label": "bytes", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)7974_storage)": { + "label": "mapping(bytes32 => struct AccessControl.RoleData)", + "numberOfBytes": "32" + }, + "t_struct(RoleData)7974_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_uint16": { + "label": "uint16", + "numberOfBytes": "2" + } + }, + "namespaces": { + "erc7201:openzeppelin.storage.Pausable": [ + { + "contract": "PausableUpgradeable", + "label": "_paused", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol:21", + "offset": 0, + "slot": "0" + } + ], + "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" + } + ] + } + } + }, + "db2414503548e502d86e9a4ee6a751a8a8873a4332db9aa40abc33c875ef66e4": { + "address": "0xD7551bb8Cb406E8AFa45d0D10b0938597BEc184B", + "txHash": "0x2258d7f6d85a28e55015ef056f316bbfb596db84c140d678feab88203d6eceec", + "layout": { + "solcVersion": "0.8.26", + "storage": [ + { + "label": "baseToken", + "offset": 0, + "slot": "0", + "type": "t_address", + "contract": "StakedToken", + "src": "contracts/token/StakedToken.sol:31" + }, + { + "label": "locks", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_array(t_struct(Lock)42488_storage)dyn_storage)", + "contract": "StakedToken", + "src": "contracts/token/StakedToken.sol:32" + }, + { + "label": "_nextId", + "offset": 0, + "slot": "2", + "type": "t_uint256", + "contract": "StakedToken", + "src": "contracts/token/StakedToken.sol:33" + }, + { + "label": "maxWeeks", + "offset": 0, + "slot": "3", + "type": "t_uint8", + "contract": "StakedToken", + "src": "contracts/token/StakedToken.sol:35" + }, + { + "label": "adminUnlocked", + "offset": 1, + "slot": "3", + "type": "t_bool", + "contract": "StakedToken", + "src": "contracts/token/StakedToken.sol:48" + }, + { + "label": "_name", + "offset": 0, + "slot": "4", + "type": "t_string_storage", + "contract": "StakedToken", + "src": "contracts/token/StakedToken.sol:49" + }, + { + "label": "_symbol", + "offset": 0, + "slot": "5", + "type": "t_string_storage", + "contract": "StakedToken", + "src": "contracts/token/StakedToken.sol:50" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_struct(Checkpoint208)7590_storage)dyn_storage": { + "label": "struct Checkpoints.Checkpoint208[]", + "numberOfBytes": "32" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_address)": { + "label": "mapping(address => address)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Trace208)7585_storage)": { + "label": "mapping(address => struct Checkpoints.Trace208)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)24_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(AccessControlStorage)34_storage": { + "label": "struct AccessControlUpgradeable.AccessControlStorage", + "members": [ + { + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)24_storage)", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Checkpoint208)7590_storage": { + "label": "struct Checkpoints.Checkpoint208", + "members": [ + { + "label": "_key", + "type": "t_uint48", + "offset": 0, + "slot": "0" + }, + { + "label": "_value", + "type": "t_uint208", + "offset": 6, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(EIP712Storage)2589_storage": { + "label": "struct EIP712Upgradeable.EIP712Storage", + "members": [ + { + "label": "_hashedName", + "type": "t_bytes32", + "offset": 0, + "slot": "0" + }, + { + "label": "_hashedVersion", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + }, + { + "label": "_name", + "type": "t_string_storage", + "offset": 0, + "slot": "2" + }, + { + "label": "_version", + "type": "t_string_storage", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_struct(InitializableStorage)1512_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_struct(NoncesStorage)2408_storage": { + "label": "struct NoncesUpgradeable.NoncesStorage", + "members": [ + { + "label": "_nonces", + "type": "t_mapping(t_address,t_uint256)", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(ReentrancyGuardStorage)2526_storage": { + "label": "struct ReentrancyGuardUpgradeable.ReentrancyGuardStorage", + "members": [ + { + "label": "_status", + "type": "t_uint256", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(RoleData)24_storage": { + "label": "struct AccessControlUpgradeable.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(Trace208)7585_storage": { + "label": "struct Checkpoints.Trace208", + "members": [ + { + "label": "_checkpoints", + "type": "t_array(t_struct(Checkpoint208)7590_storage)dyn_storage", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(VotesStorage)1323_storage": { + "label": "struct VotesUpgradeable.VotesStorage", + "members": [ + { + "label": "_delegatee", + "type": "t_mapping(t_address,t_address)", + "offset": 0, + "slot": "0" + }, + { + "label": "_delegateCheckpoints", + "type": "t_mapping(t_address,t_struct(Trace208)7585_storage)", + "offset": 0, + "slot": "1" + }, + { + "label": "_totalCheckpoints", + "type": "t_struct(Trace208)7585_storage", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_uint208": { + "label": "uint208", + "numberOfBytes": "26" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint48": { + "label": "uint48", + "numberOfBytes": "6" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_array(t_struct(Lock)42488_storage)dyn_storage": { + "label": "struct StakedToken.Lock[]", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_array(t_struct(Lock)42488_storage)dyn_storage)": { + "label": "mapping(address => struct StakedToken.Lock[])", + "numberOfBytes": "32" + }, + "t_struct(Lock)42488_storage": { + "label": "struct StakedToken.Lock", + "members": [ + { + "label": "amount", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "start", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "end", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "numWeeks", + "type": "t_uint8", + "offset": 0, + "slot": "3" + }, + { + "label": "autoRenew", + "type": "t_bool", + "offset": 1, + "slot": "3" + }, + { + "label": "id", + "type": "t_uint256", + "offset": 0, + "slot": "4" + } + ], + "numberOfBytes": "160" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": { + "erc7201:openzeppelin.storage.Votes": [ + { + "contract": "VotesUpgradeable", + "label": "_delegatee", + "type": "t_mapping(t_address,t_address)", + "src": "@openzeppelin/contracts-upgradeable/governance/utils/VotesUpgradeable.sol:41", + "offset": 0, + "slot": "0" + }, + { + "contract": "VotesUpgradeable", + "label": "_delegateCheckpoints", + "type": "t_mapping(t_address,t_struct(Trace208)7585_storage)", + "src": "@openzeppelin/contracts-upgradeable/governance/utils/VotesUpgradeable.sol:43", + "offset": 0, + "slot": "1" + }, + { + "contract": "VotesUpgradeable", + "label": "_totalCheckpoints", + "type": "t_struct(Trace208)7585_storage", + "src": "@openzeppelin/contracts-upgradeable/governance/utils/VotesUpgradeable.sol:45", + "offset": 0, + "slot": "2" + } + ], + "erc7201:openzeppelin.storage.Nonces": [ + { + "contract": "NoncesUpgradeable", + "label": "_nonces", + "type": "t_mapping(t_address,t_uint256)", + "src": "@openzeppelin/contracts-upgradeable/utils/NoncesUpgradeable.sol:17", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.EIP712": [ + { + "contract": "EIP712Upgradeable", + "label": "_hashedName", + "type": "t_bytes32", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:39", + "offset": 0, + "slot": "0" + }, + { + "contract": "EIP712Upgradeable", + "label": "_hashedVersion", + "type": "t_bytes32", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:41", + "offset": 0, + "slot": "1" + }, + { + "contract": "EIP712Upgradeable", + "label": "_name", + "type": "t_string_storage", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:43", + "offset": 0, + "slot": "2" + }, + { + "contract": "EIP712Upgradeable", + "label": "_version", + "type": "t_string_storage", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:44", + "offset": 0, + "slot": "3" + } + ], + "erc7201:openzeppelin.storage.AccessControl": [ + { + "contract": "AccessControlUpgradeable", + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)24_storage)", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:61", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.ReentrancyGuard": [ + { + "contract": "ReentrancyGuardUpgradeable", + "label": "_status", + "type": "t_uint256", + "src": "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol:40", + "offset": 0, + "slot": "0" + } + ], + "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/.openzeppelin/sepolia.json b/.openzeppelin/sepolia.json index e0865b8..5ffdebc 100644 --- a/.openzeppelin/sepolia.json +++ b/.openzeppelin/sepolia.json @@ -5,6 +5,31 @@ "address": "0x1D7aAf461d4899F3805cBBb80BAa38721F9b09f3", "txHash": "0x91de2a646ed1c17ec074d89e64601c86babd2a13e36e2d77a9a8d6e29087fcd0", "kind": "transparent" + }, + { + "address": "0xa598E14c8322454fA6521da922F90d7843bD6d23", + "txHash": "0x1b70cb38b5083b6f8525183f29213c44e6eb1a5f7c5570c1fbd6cd448528dcf1", + "kind": "transparent" + }, + { + "address": "0xa603878eea132EecA5f352ebEe9f1f0EEAdeD277", + "txHash": "0x3e342b991010d0009a70f123f1309d3939bdc558870410caca9bde5976e437be", + "kind": "transparent" + }, + { + "address": "0xa2Ba7aDFa354bB93A314164f35D6643335a97215", + "txHash": "0x68901febbbd20b95a385c020577d6ebede9915b07dd8e77f90a62ea9f2170c7c", + "kind": "transparent" + }, + { + "address": "0x8ed9AC7A916C12916b60CF070BC62322253e0ec4", + "txHash": "0x6652f148aaf3abb37cca84acffd47cb19d9425f2b8fbf87f2fd80ad3737ff6ce", + "kind": "transparent" + }, + { + "address": "0x8175B5D028f3D56A33871A5b68C135cD5f47D791", + "txHash": "0xb3ab433dc6bca83d8fcdc305b52f0e67cee4f9c7ce7db01ec5eff8eb3732a009", + "kind": "transparent" } ], "impls": { @@ -145,6 +170,670 @@ ] } } + }, + "8cd3fb5f36897dbf98d43921ecff3fd3951a1b3db5a4c7fba9e7ab1aa566a00f": { + "address": "0xcD879fb4Aa20dDE6B8a327EFcbAdF940CB5E42E6", + "txHash": "0xda28e391a010ddd60398ba38eb72cf4dccbadb0a6510a7e9496f2ef6763c2aa3", + "layout": { + "solcVersion": "0.8.26", + "storage": [ + { + "label": "_roles", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_struct(RoleData)7974_storage)", + "contract": "AccessControl", + "src": "@openzeppelin/contracts/access/AccessControl.sol:55" + }, + { + "label": "tokenImplementation", + "offset": 0, + "slot": "1", + "type": "t_address", + "contract": "SimpleAgentFactory", + "src": "contracts/virtualPersona/EthAgentFactory.sol:25" + }, + { + "label": "assetToken", + "offset": 0, + "slot": "2", + "type": "t_address", + "contract": "SimpleAgentFactory", + "src": "contracts/virtualPersona/EthAgentFactory.sol:27" + }, + { + "label": "_vault", + "offset": 0, + "slot": "3", + "type": "t_address", + "contract": "SimpleAgentFactory", + "src": "contracts/virtualPersona/EthAgentFactory.sol:29" + }, + { + "label": "_tokenAdmin", + "offset": 0, + "slot": "4", + "type": "t_address", + "contract": "SimpleAgentFactory", + "src": "contracts/virtualPersona/EthAgentFactory.sol:31" + }, + { + "label": "locked", + "offset": 20, + "slot": "4", + "type": "t_bool", + "contract": "SimpleAgentFactory", + "src": "contracts/virtualPersona/EthAgentFactory.sol:33" + }, + { + "label": "allTradingTokens", + "offset": 0, + "slot": "5", + "type": "t_array(t_address)dyn_storage", + "contract": "SimpleAgentFactory", + "src": "contracts/virtualPersona/EthAgentFactory.sol:45" + }, + { + "label": "_uniswapRouter", + "offset": 0, + "slot": "6", + "type": "t_address", + "contract": "SimpleAgentFactory", + "src": "contracts/virtualPersona/EthAgentFactory.sol:46" + }, + { + "label": "_tokenSupplyParams", + "offset": 0, + "slot": "7", + "type": "t_bytes_storage", + "contract": "SimpleAgentFactory", + "src": "contracts/virtualPersona/EthAgentFactory.sol:49" + }, + { + "label": "_tokenTaxParams", + "offset": 0, + "slot": "8", + "type": "t_bytes_storage", + "contract": "SimpleAgentFactory", + "src": "contracts/virtualPersona/EthAgentFactory.sol:50" + }, + { + "label": "_tokenMultiplier", + "offset": 0, + "slot": "9", + "type": "t_uint16", + "contract": "SimpleAgentFactory", + "src": "contracts/virtualPersona/EthAgentFactory.sol:51" + }, + { + "label": "_existingAgents", + "offset": 0, + "slot": "10", + "type": "t_mapping(t_address,t_bool)", + "contract": "SimpleAgentFactory", + "src": "contracts/virtualPersona/EthAgentFactory.sol:55" + } + ], + "types": { + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_struct(InitializableStorage)1512_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_struct(PausableStorage)2462_storage": { + "label": "struct PausableUpgradeable.PausableStorage", + "members": [ + { + "label": "_paused", + "type": "t_bool", + "offset": 0, + "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_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_bytes_storage": { + "label": "bytes", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)7974_storage)": { + "label": "mapping(bytes32 => struct AccessControl.RoleData)", + "numberOfBytes": "32" + }, + "t_struct(RoleData)7974_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_uint16": { + "label": "uint16", + "numberOfBytes": "2" + } + }, + "namespaces": { + "erc7201:openzeppelin.storage.Pausable": [ + { + "contract": "PausableUpgradeable", + "label": "_paused", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol:21", + "offset": 0, + "slot": "0" + } + ], + "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" + } + ] + } + } + }, + "db2414503548e502d86e9a4ee6a751a8a8873a4332db9aa40abc33c875ef66e4": { + "address": "0x7C1F4f1f968d2926F48E02A7eF380Ad3b51B257a", + "txHash": "0x2bb83e26febc88c616983bc2ff4bb8e245937a4a9789e97b46c248eac3bd9e61", + "layout": { + "solcVersion": "0.8.26", + "storage": [ + { + "label": "baseToken", + "offset": 0, + "slot": "0", + "type": "t_address", + "contract": "StakedToken", + "src": "contracts/token/StakedToken.sol:31" + }, + { + "label": "locks", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_array(t_struct(Lock)42488_storage)dyn_storage)", + "contract": "StakedToken", + "src": "contracts/token/StakedToken.sol:32" + }, + { + "label": "_nextId", + "offset": 0, + "slot": "2", + "type": "t_uint256", + "contract": "StakedToken", + "src": "contracts/token/StakedToken.sol:33" + }, + { + "label": "maxWeeks", + "offset": 0, + "slot": "3", + "type": "t_uint8", + "contract": "StakedToken", + "src": "contracts/token/StakedToken.sol:35" + }, + { + "label": "adminUnlocked", + "offset": 1, + "slot": "3", + "type": "t_bool", + "contract": "StakedToken", + "src": "contracts/token/StakedToken.sol:48" + }, + { + "label": "_name", + "offset": 0, + "slot": "4", + "type": "t_string_storage", + "contract": "StakedToken", + "src": "contracts/token/StakedToken.sol:49" + }, + { + "label": "_symbol", + "offset": 0, + "slot": "5", + "type": "t_string_storage", + "contract": "StakedToken", + "src": "contracts/token/StakedToken.sol:50" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_struct(Checkpoint208)7590_storage)dyn_storage": { + "label": "struct Checkpoints.Checkpoint208[]", + "numberOfBytes": "32" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_address)": { + "label": "mapping(address => address)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Trace208)7585_storage)": { + "label": "mapping(address => struct Checkpoints.Trace208)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)24_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(AccessControlStorage)34_storage": { + "label": "struct AccessControlUpgradeable.AccessControlStorage", + "members": [ + { + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)24_storage)", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Checkpoint208)7590_storage": { + "label": "struct Checkpoints.Checkpoint208", + "members": [ + { + "label": "_key", + "type": "t_uint48", + "offset": 0, + "slot": "0" + }, + { + "label": "_value", + "type": "t_uint208", + "offset": 6, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(EIP712Storage)2589_storage": { + "label": "struct EIP712Upgradeable.EIP712Storage", + "members": [ + { + "label": "_hashedName", + "type": "t_bytes32", + "offset": 0, + "slot": "0" + }, + { + "label": "_hashedVersion", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + }, + { + "label": "_name", + "type": "t_string_storage", + "offset": 0, + "slot": "2" + }, + { + "label": "_version", + "type": "t_string_storage", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_struct(InitializableStorage)1512_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_struct(NoncesStorage)2408_storage": { + "label": "struct NoncesUpgradeable.NoncesStorage", + "members": [ + { + "label": "_nonces", + "type": "t_mapping(t_address,t_uint256)", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(ReentrancyGuardStorage)2526_storage": { + "label": "struct ReentrancyGuardUpgradeable.ReentrancyGuardStorage", + "members": [ + { + "label": "_status", + "type": "t_uint256", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(RoleData)24_storage": { + "label": "struct AccessControlUpgradeable.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(Trace208)7585_storage": { + "label": "struct Checkpoints.Trace208", + "members": [ + { + "label": "_checkpoints", + "type": "t_array(t_struct(Checkpoint208)7590_storage)dyn_storage", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(VotesStorage)1323_storage": { + "label": "struct VotesUpgradeable.VotesStorage", + "members": [ + { + "label": "_delegatee", + "type": "t_mapping(t_address,t_address)", + "offset": 0, + "slot": "0" + }, + { + "label": "_delegateCheckpoints", + "type": "t_mapping(t_address,t_struct(Trace208)7585_storage)", + "offset": 0, + "slot": "1" + }, + { + "label": "_totalCheckpoints", + "type": "t_struct(Trace208)7585_storage", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_uint208": { + "label": "uint208", + "numberOfBytes": "26" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint48": { + "label": "uint48", + "numberOfBytes": "6" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_array(t_struct(Lock)42488_storage)dyn_storage": { + "label": "struct StakedToken.Lock[]", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_array(t_struct(Lock)42488_storage)dyn_storage)": { + "label": "mapping(address => struct StakedToken.Lock[])", + "numberOfBytes": "32" + }, + "t_struct(Lock)42488_storage": { + "label": "struct StakedToken.Lock", + "members": [ + { + "label": "amount", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "start", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "end", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "numWeeks", + "type": "t_uint8", + "offset": 0, + "slot": "3" + }, + { + "label": "autoRenew", + "type": "t_bool", + "offset": 1, + "slot": "3" + }, + { + "label": "id", + "type": "t_uint256", + "offset": 0, + "slot": "4" + } + ], + "numberOfBytes": "160" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": { + "erc7201:openzeppelin.storage.Votes": [ + { + "contract": "VotesUpgradeable", + "label": "_delegatee", + "type": "t_mapping(t_address,t_address)", + "src": "@openzeppelin/contracts-upgradeable/governance/utils/VotesUpgradeable.sol:41", + "offset": 0, + "slot": "0" + }, + { + "contract": "VotesUpgradeable", + "label": "_delegateCheckpoints", + "type": "t_mapping(t_address,t_struct(Trace208)7585_storage)", + "src": "@openzeppelin/contracts-upgradeable/governance/utils/VotesUpgradeable.sol:43", + "offset": 0, + "slot": "1" + }, + { + "contract": "VotesUpgradeable", + "label": "_totalCheckpoints", + "type": "t_struct(Trace208)7585_storage", + "src": "@openzeppelin/contracts-upgradeable/governance/utils/VotesUpgradeable.sol:45", + "offset": 0, + "slot": "2" + } + ], + "erc7201:openzeppelin.storage.Nonces": [ + { + "contract": "NoncesUpgradeable", + "label": "_nonces", + "type": "t_mapping(t_address,t_uint256)", + "src": "@openzeppelin/contracts-upgradeable/utils/NoncesUpgradeable.sol:17", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.EIP712": [ + { + "contract": "EIP712Upgradeable", + "label": "_hashedName", + "type": "t_bytes32", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:39", + "offset": 0, + "slot": "0" + }, + { + "contract": "EIP712Upgradeable", + "label": "_hashedVersion", + "type": "t_bytes32", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:41", + "offset": 0, + "slot": "1" + }, + { + "contract": "EIP712Upgradeable", + "label": "_name", + "type": "t_string_storage", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:43", + "offset": 0, + "slot": "2" + }, + { + "contract": "EIP712Upgradeable", + "label": "_version", + "type": "t_string_storage", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:44", + "offset": 0, + "slot": "3" + } + ], + "erc7201:openzeppelin.storage.AccessControl": [ + { + "contract": "AccessControlUpgradeable", + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)24_storage)", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:61", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.ReentrancyGuard": [ + { + "contract": "ReentrancyGuardUpgradeable", + "label": "_status", + "type": "t_uint256", + "src": "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol:40", + "offset": 0, + "slot": "0" + } + ], + "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/contracts/virtualPersona/SimpleAgentFactory.sol b/contracts/virtualPersona/SimpleAgentFactory.sol new file mode 100644 index 0000000..b4df3ec --- /dev/null +++ b/contracts/virtualPersona/SimpleAgentFactory.sol @@ -0,0 +1,172 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; + +import "@openzeppelin/contracts/proxy/Clones.sol"; +import "@openzeppelin/contracts/governance/IGovernor.sol"; +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; +import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; +import "@openzeppelin/contracts/access/AccessControl.sol"; +import "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol"; + +import "./IAgentToken.sol"; +import "./IAgentVeToken.sol"; +import "./IAgentDAO.sol"; +import "./IAgentNft.sol"; +import "../libs/IERC6551Registry.sol"; + +contract SimpleAgentFactory is + Initializable, + AccessControl, + PausableUpgradeable +{ + using SafeERC20 for IERC20; + + address public tokenImplementation; + + address public assetToken; // Base currency + + address private _vault; // Vault to hold all Virtual NFTs + + address private _tokenAdmin; + + bool internal locked; + + modifier noReentrant() { + require(!locked, "cannot reenter"); + locked = true; + _; + locked = false; + } + + /////////////////////////////////////////////////////////////// + // V2 Storage + /////////////////////////////////////////////////////////////// + address[] public allTradingTokens; + address private _uniswapRouter; + + // Default agent token params + bytes private _tokenSupplyParams; + bytes private _tokenTaxParams; + uint16 private _tokenMultiplier; // Unused + + /////////////////////////////////////////////////////////////// + + mapping(address => bool) private _existingAgents; + + error AgentAlreadyExists(); + + /// @custom:oz-upgrades-unsafe-allow constructor + constructor() { + _disableInitializers(); + } + + function initialize( + address tokenImplementation_, + address assetToken_, + address vault_ + ) public initializer { + __Pausable_init(); + + tokenImplementation = tokenImplementation_; + assetToken = assetToken_; + _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); + _vault = vault_; + } + + function setParams( + address newRouter, + address newTokenAdmin + ) public onlyRole(DEFAULT_ADMIN_ROLE) { + _uniswapRouter = newRouter; + _tokenAdmin = newTokenAdmin; + } + + function createNewAgentToken( + string memory name, + string memory symbol, + bytes32 salt + ) external onlyRole(DEFAULT_ADMIN_ROLE) returns (address instance) { + instance = Clones.cloneDeterministic(tokenImplementation, salt); + if (_existingAgents[instance]) { + revert AgentAlreadyExists(); + } + _existingAgents[instance] = true; + IAgentToken(instance).initialize( + [_tokenAdmin, _uniswapRouter, assetToken], + abi.encode(name, symbol), + _tokenSupplyParams, + _tokenTaxParams + ); + + allTradingTokens.push(instance); + return instance; + } + + function setVault(address newVault) public onlyRole(DEFAULT_ADMIN_ROLE) { + _vault = newVault; + } + + function setImplementations( + address token + ) public onlyRole(DEFAULT_ADMIN_ROLE) { + tokenImplementation = token; + } + + function setTokenParams( + uint256 maxSupply, + uint256 lpSupply, + uint256 vaultSupply, + uint256 maxTokensPerWallet, + uint256 maxTokensPerTxn, + uint256 botProtectionDurationInSeconds, + address vault, + uint256 projectBuyTaxBasisPoints, + uint256 projectSellTaxBasisPoints, + uint256 taxSwapThresholdBasisPoints, + address projectTaxRecipient + ) public onlyRole(DEFAULT_ADMIN_ROLE) { + require((lpSupply + vaultSupply) <= maxSupply, "Invalid supply"); + _tokenSupplyParams = abi.encode( + maxSupply, + lpSupply, + vaultSupply, + maxTokensPerWallet, + maxTokensPerTxn, + botProtectionDurationInSeconds, + vault + ); + _tokenTaxParams = abi.encode( + projectBuyTaxBasisPoints, + projectSellTaxBasisPoints, + taxSwapThresholdBasisPoints, + projectTaxRecipient + ); + } + + function pause() public onlyRole(DEFAULT_ADMIN_ROLE) { + _pause(); + } + + function unpause() public onlyRole(DEFAULT_ADMIN_ROLE) { + _unpause(); + } + + function _msgSender() + internal + view + override(Context, ContextUpgradeable) + returns (address sender) + { + sender = ContextUpgradeable._msgSender(); + } + + function _msgData() + internal + view + override(Context, ContextUpgradeable) + returns (bytes calldata) + { + return ContextUpgradeable._msgData(); + } +} diff --git a/hardhat.config.js b/hardhat.config.js index 1df07f8..08f5b55 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -81,6 +81,14 @@ module.exports = { }, }, }, + eth_sepolia: { + url: "", + accounts: [process.env.PRIVATE_KEY] + }, + eth_mainnet: { + url: "", + accounts: [process.env.PRIVATE_KEY] + }, base_sepolia_fire: { url: "https://sepolia.base.org", accounts: [process.env.PRIVATE_KEY], diff --git a/scripts/v3/createNewAgentToken.ts b/scripts/v3/createNewAgentToken.ts new file mode 100644 index 0000000..51fcf2e --- /dev/null +++ b/scripts/v3/createNewAgentToken.ts @@ -0,0 +1,32 @@ +import { ethers } from "hardhat"; + +(async () => { + try { + const simpleAgentFactory = await ethers.getContractFactory("SimpleAgentFactory"); + const factoryAddress = process.env.ETH_AGENT_FACTORY + + const tokenContract = simpleAgentFactory.attach(factoryAddress); + + const name = "Token"; + const symbol = "Token"; + + const [signer] = await ethers.getSigners(); + console.log("Using signer address:", signer.address); + + // Generate random salt + const salt = ethers.randomBytes(32); + // Create agent token with all parameters + + const tx3 = await tokenContract.createNewAgentToken( + name, + symbol, + salt, + ); + + console.log("Transaction hash:", tx3.hash); + const receipt = await tx3.wait() + + } catch (e) { + console.log(e); + } +})(); \ No newline at end of file diff --git a/scripts/v3/deployAgentFactorySimple.ts b/scripts/v3/deployAgentFactorySimple.ts new file mode 100644 index 0000000..c96de01 --- /dev/null +++ b/scripts/v3/deployAgentFactorySimple.ts @@ -0,0 +1,32 @@ +import { ethers, upgrades } from "hardhat"; + +(async () => { + try { + + const [deployer] = await ethers.getSigners() + console.log(deployer.address) + + const token = await ethers.deployContract("AgentToken"); + await token.waitForDeployment(); + console.log("AgentToken deployed to:", token.target); + + const agentToken = token.target + const virtualToken = process.env.BRIDGED_TOKEN + + const agentFactory = await upgrades.deployProxy( + await ethers.getContractFactory("SimpleAgentFactory"), + [ + agentToken, + virtualToken, + deployer.address, + ] + ); + await agentFactory.waitForDeployment(); + console.log("AgentTokenFactory deployed to:", agentFactory.target); + } catch (e) { + console.log(e); + } +})(); + + + diff --git a/scripts/v3/deployToken.ts b/scripts/v3/deployToken.ts new file mode 100644 index 0000000..73cef36 --- /dev/null +++ b/scripts/v3/deployToken.ts @@ -0,0 +1,15 @@ +import { ethers } from "hardhat"; + +(async () => { + try { + const initialOwner = process.env.DEPLOYER + const token = await ethers.deployContract("Token", [initialOwner]); + await token.waitForDeployment(); + console.log("Token deployed to:", token.target); + } catch (e) { + console.log(e); + } +})(); + + + diff --git a/scripts/v3/finaliseNewAgentToken.ts b/scripts/v3/finaliseNewAgentToken.ts new file mode 100644 index 0000000..b2df635 --- /dev/null +++ b/scripts/v3/finaliseNewAgentToken.ts @@ -0,0 +1,64 @@ +import { ethers, upgrades } from "hardhat"; + +(async () => { + try { + const simpleAgentFactory = await ethers.getContractFactory("SimpleAgentFactory"); + const factoryAddress = process.env.ETH_AGENT_FACTORY + const tokenContract = simpleAgentFactory.attach(factoryAddress); + const lockupAddress = process.env.LOCKUP_ADDRESS + // 4. Agent Token Add initial Liquidity + + //send 84k virtuals to agenttoken + const virtualToken = process.env.BRIDGED_TOKEN + const agentToken = "TOKEN ADDRESS" + const initialLiquidityAmount = "84000" + + const agentTokenContract = await ethers.getContractFactory("AgentToken") + const agentTokenProxy = agentTokenContract.attach(agentToken) + //4. send token + const virtualTokenContract = await ethers.getContractAt("ERC20", virtualToken); + const tx = await virtualTokenContract.transfer(agentToken, ethers.parseEther(initialLiquidityAmount)); + console.log("Transaction hash:", tx.hash); + console.log("Sent Virtuals Token") + await tx.wait(); + + + // // 5. send 500 million to lock up + const tx5 = await agentTokenProxy.transfer(lockupAddress, ethers.parseEther("500000000")) + console.log("Transaction hash:", tx5.hash); + console.log("Sent Agent Token to lock") + await tx5.wait(); + + // 6. create staking contract + const args = [agentToken, 2, "Staked Token", "stToken"]; + const Contract = await ethers.getContractFactory("StakedToken"); + const contract = await upgrades.deployProxy(Contract, args, { + initialOwner: process.env.CONTRACT_CONTROLLER, + }); + await contract.waitForDeployment(); + + // console.log("stakedToken deployed to:", contract.target); + + // 8. transfer tokens into distributor + const merkleDistributorAddress = "merkle address" + const tx8 = await agentTokenProxy.transfer(merkleDistributorAddress, ethers.parseEther("375000000")) + console.log("Transaction hash:", tx8.hash); + await tx8.wait(); + + // 8.5 transfer tokens into airdrop distributor + const airdropAddress = "airdrop merkle" + const tx8_5 = await agentTokenProxy.transfer(airdropAddress, ethers.parseEther("amount")) + console.log("Transaction hash:", tx8_5.hash); + await tx8_5.wait(); + + // 9. add initial liquidity + + const tx6 = await agentTokenProxy.addInitialLiquidity(lockupAddress) + console.log("Transaction hash:", tx6.hash); + await tx6.wait(); + + + } catch (e) { + console.log(e); + } +})(); \ No newline at end of file diff --git a/scripts/v3/setAgentFactoryParams.ts b/scripts/v3/setAgentFactoryParams.ts new file mode 100644 index 0000000..1dd8a0f --- /dev/null +++ b/scripts/v3/setAgentFactoryParams.ts @@ -0,0 +1,45 @@ +import { ethers } from "hardhat"; + +(async () => { + try { + const simpleAgentFactory = await ethers.getContractFactory("SimpleAgentFactory"); + const factoryAddress = process.env.ETH_AGENT_FACTORY + const taxRecipient = process.env.TAX_RECIPIENT + const tokenContract = simpleAgentFactory.attach(factoryAddress); + + const [signer] = await ethers.getSigners(); + console.log("Using signer address:", signer.address); + + + // Create supply parameters structure + //set implementations + const uniswapRouter = "" // uniswap v2 router + + const tx = await tokenContract.setParams(uniswapRouter, signer.address); + await tx.wait(); + + console.log("Transaction hash:", tx.hash); + + + const tx2 = await tokenContract.setTokenParams( + process.env.AGENT_TOKEN_SUPPLY, + process.env.AGENT_TOKEN_LP_SUPPLY, + process.env.AGENT_TOKEN_VAULT_SUPPLY, + process.env.AGENT_TOKEN_SUPPLY, + process.env.AGENT_TOKEN_SUPPLY, + process.env.BOT_PROTECTION, + signer.address, + process.env.TAX, + process.env.TAX, + process.env.SWAP_THRESHOLD, + taxRecipient + ); + + console.log("Transaction hash:", tx2.hash); + await tx2.wait(); + + + } catch (e) { + console.log(e); + } +})(); \ No newline at end of file