diff --git a/.openzeppelin/goerli.json b/.openzeppelin/goerli.json index b39f36c8..ff7f4a2d 100644 --- a/.openzeppelin/goerli.json +++ b/.openzeppelin/goerli.json @@ -1100,6 +1100,513 @@ } } } + }, + "92f2fa955a8b14d88f0d6bdccad2dac5752f89ba4a34c06d54a6512633c9c628": { + "address": "0x6DEf201461DcA70f7fEB757FBADFF9c34a240bfC", + "txHash": "0xd82302d4bbd39547684b3dc5289cc3b00b0d74228c79d0cc16adc98b9347fbe0", + "layout": { + "storage": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:25" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:30" + }, + { + "contract": "ContextUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:31" + }, + { + "contract": "PausableUpgradeable", + "label": "_paused", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol:28" + }, + { + "contract": "PausableUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol:96" + }, + { + "contract": "AccessControlUpgradeable", + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)39_storage)", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:61" + }, + { + "contract": "AccessControlUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:225" + }, + { + "contract": "ERC20Upgradeable", + "label": "_allowances", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", + "src": "contracts/tokens/ERC20Upgradeable.sol:38" + }, + { + "contract": "ERC20Upgradeable", + "label": "_name", + "type": "t_string_storage", + "src": "contracts/tokens/ERC20Upgradeable.sol:40" + }, + { + "contract": "ERC20Upgradeable", + "label": "_symbol", + "type": "t_string_storage", + "src": "contracts/tokens/ERC20Upgradeable.sol:41" + }, + { + "contract": "ERC20Upgradeable", + "label": "_decimals", + "type": "t_uint8", + "src": "contracts/tokens/ERC20Upgradeable.sol:42" + }, + { + "contract": "ERC20Upgradeable", + "label": "__gap", + "type": "t_array(t_uint256)44_storage", + "src": "contracts/tokens/ERC20Upgradeable.sol:225" + }, + { + "contract": "EIP712Upgradeable", + "label": "_HASHED_NAME", + "type": "t_bytes32", + "src": "@openzeppelin/contracts-upgradeable/drafts/EIP712Upgradeable.sol:27" + }, + { + "contract": "EIP712Upgradeable", + "label": "_HASHED_VERSION", + "type": "t_bytes32", + "src": "@openzeppelin/contracts-upgradeable/drafts/EIP712Upgradeable.sol:28" + }, + { + "contract": "EIP712Upgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "@openzeppelin/contracts-upgradeable/drafts/EIP712Upgradeable.sol:120" + }, + { + "contract": "ERC20PermitUpgradeable", + "label": "_nonces", + "type": "t_mapping(t_address,t_struct(Counter)1710_storage)", + "src": "contracts/tokens/ERC20PermitUpgradeable.sol:26" + }, + { + "contract": "ERC20PermitUpgradeable", + "label": "_PERMIT_TYPEHASH", + "type": "t_bytes32", + "src": "contracts/tokens/ERC20PermitUpgradeable.sol:29" + }, + { + "contract": "ERC20PermitUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "contracts/tokens/ERC20PermitUpgradeable.sol:88" + }, + { + "contract": "StakeWiseToken", + "label": "_balances", + "type": "t_mapping(t_address,t_uint256)", + "src": "contracts/tokens/StakeWiseToken.sol:15" + }, + { + "contract": "StakeWiseToken", + "label": "_totalSupply", + "type": "t_uint256", + "src": "contracts/tokens/StakeWiseToken.sol:17" + } + ], + "types": { + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)" + }, + "t_address": { + "label": "address" + }, + "t_uint256": { + "label": "uint256" + }, + "t_mapping(t_address,t_struct(Counter)1710_storage)": { + "label": "mapping(address => struct CountersUpgradeable.Counter)" + }, + "t_struct(Counter)1710_storage": { + "label": "struct CountersUpgradeable.Counter", + "members": [ + { + "label": "_value", + "type": "t_uint256" + } + ] + }, + "t_bytes32": { + "label": "bytes32" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "label": "mapping(address => mapping(address => uint256))" + }, + "t_string_storage": { + "label": "string" + }, + "t_uint8": { + "label": "uint8" + }, + "t_array(t_uint256)44_storage": { + "label": "uint256[44]" + }, + "t_mapping(t_bytes32,t_struct(RoleData)39_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)" + }, + "t_struct(RoleData)39_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_struct(AddressSet)2026_storage" + }, + { + "label": "adminRole", + "type": "t_bytes32" + } + ] + }, + "t_struct(AddressSet)2026_storage": { + "label": "struct EnumerableSetUpgradeable.AddressSet", + "members": [ + { + "label": "_inner", + "type": "t_struct(Set)1761_storage" + } + ] + }, + "t_struct(Set)1761_storage": { + "label": "struct EnumerableSetUpgradeable.Set", + "members": [ + { + "label": "_values", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "label": "_indexes", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ] + }, + "t_array(t_bytes32)dyn_storage": { + "label": "bytes32[]" + }, + "t_mapping(t_bytes32,t_uint256)": { + "label": "mapping(bytes32 => uint256)" + }, + "t_bool": { + "label": "bool" + } + } + } + }, + "de2b2b9599ed08c7b524042f3efbe7c2d5a43aedd25613e6c7d209c01cbbbbd5": { + "address": "0xb809AA5a1025170F09B3E3b31fDD8a93ac04da5e", + "txHash": "0x2b29d740ba4ebdcc5cc5ec417d78ce90d304375014e4bb7294b215c75be7fa48", + "layout": { + "storage": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:25" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:30" + }, + { + "contract": "ReentrancyGuardUpgradeable", + "label": "_status", + "type": "t_uint256", + "src": "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol:37" + }, + { + "contract": "ReentrancyGuardUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol:67" + }, + { + "contract": "ContextUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:31" + }, + { + "contract": "PausableUpgradeable", + "label": "_paused", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol:28" + }, + { + "contract": "PausableUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol:96" + }, + { + "contract": "AccessControlUpgradeable", + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)39_storage)", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:61" + }, + { + "contract": "AccessControlUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:225" + }, + { + "contract": "VestingEscrowFactory", + "label": "escrowImplementation", + "type": "t_address", + "src": "contracts/vestings/VestingEscrowFactory.sol:27" + }, + { + "contract": "VestingEscrowFactory", + "label": "escrows", + "type": "t_mapping(t_address,t_array(t_address)dyn_storage)", + "src": "contracts/vestings/VestingEscrowFactory.sol:30" + } + ], + "types": { + "t_address": { + "label": "address" + }, + "t_mapping(t_address,t_array(t_address)dyn_storage)": { + "label": "mapping(address => address[])" + }, + "t_array(t_address)dyn_storage": { + "label": "address[]" + }, + "t_mapping(t_bytes32,t_struct(RoleData)39_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)" + }, + "t_bytes32": { + "label": "bytes32" + }, + "t_struct(RoleData)39_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_struct(AddressSet)2026_storage" + }, + { + "label": "adminRole", + "type": "t_bytes32" + } + ] + }, + "t_struct(AddressSet)2026_storage": { + "label": "struct EnumerableSetUpgradeable.AddressSet", + "members": [ + { + "label": "_inner", + "type": "t_struct(Set)1761_storage" + } + ] + }, + "t_struct(Set)1761_storage": { + "label": "struct EnumerableSetUpgradeable.Set", + "members": [ + { + "label": "_values", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "label": "_indexes", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ] + }, + "t_array(t_bytes32)dyn_storage": { + "label": "bytes32[]" + }, + "t_mapping(t_bytes32,t_uint256)": { + "label": "mapping(bytes32 => uint256)" + }, + "t_uint256": { + "label": "uint256" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]" + }, + "t_bool": { + "label": "bool" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]" + } + } + } + }, + "7e326bc95738472f562a024cfb314277973b02dece8afdcc5ca2556ffbfd9d70": { + "address": "0x1BBf89F4Dc9913FCC14EF5A336A1d8C23Ccb74E3", + "txHash": "0x4a62b639e881e498f6e7128092f866ef3b660a8d3a61afa27f3b250867a61ef8", + "layout": { + "storage": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:25" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:30" + }, + { + "contract": "ReentrancyGuardUpgradeable", + "label": "_status", + "type": "t_uint256", + "src": "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol:37" + }, + { + "contract": "ReentrancyGuardUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol:67" + }, + { + "contract": "ContextUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:31" + }, + { + "contract": "PausableUpgradeable", + "label": "_paused", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol:28" + }, + { + "contract": "PausableUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol:96" + }, + { + "contract": "AccessControlUpgradeable", + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)39_storage)", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:61" + }, + { + "contract": "AccessControlUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:225" + }, + { + "contract": "VestingEscrowFactory", + "label": "escrowImplementation", + "type": "t_address", + "src": "contracts/vestings/VestingEscrowFactory.sol:27" + }, + { + "contract": "VestingEscrowFactory", + "label": "escrows", + "type": "t_mapping(t_address,t_array(t_address)dyn_storage)", + "src": "contracts/vestings/VestingEscrowFactory.sol:30" + } + ], + "types": { + "t_address": { + "label": "address" + }, + "t_mapping(t_address,t_array(t_address)dyn_storage)": { + "label": "mapping(address => address[])" + }, + "t_array(t_address)dyn_storage": { + "label": "address[]" + }, + "t_mapping(t_bytes32,t_struct(RoleData)39_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)" + }, + "t_bytes32": { + "label": "bytes32" + }, + "t_struct(RoleData)39_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_struct(AddressSet)2026_storage" + }, + { + "label": "adminRole", + "type": "t_bytes32" + } + ] + }, + "t_struct(AddressSet)2026_storage": { + "label": "struct EnumerableSetUpgradeable.AddressSet", + "members": [ + { + "label": "_inner", + "type": "t_struct(Set)1761_storage" + } + ] + }, + "t_struct(Set)1761_storage": { + "label": "struct EnumerableSetUpgradeable.Set", + "members": [ + { + "label": "_values", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "label": "_indexes", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ] + }, + "t_array(t_bytes32)dyn_storage": { + "label": "bytes32[]" + }, + "t_mapping(t_bytes32,t_uint256)": { + "label": "mapping(bytes32 => uint256)" + }, + "t_uint256": { + "label": "uint256" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]" + }, + "t_bool": { + "label": "bool" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]" + } + } + } } }, "admin": { diff --git a/.openzeppelin/mainnet.json b/.openzeppelin/mainnet.json index 6bc6e536..4a7afcfb 100644 --- a/.openzeppelin/mainnet.json +++ b/.openzeppelin/mainnet.json @@ -1100,6 +1100,513 @@ } } } + }, + "92f2fa955a8b14d88f0d6bdccad2dac5752f89ba4a34c06d54a6512633c9c628": { + "address": "0xA28C2d79f0c5B78CeC699DAB0303008179815396", + "txHash": "0x89bdc085721509174aba659d8b9c80d32f86d5ab37c144073636dbe76d6c1e32", + "layout": { + "storage": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:25" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:30" + }, + { + "contract": "ContextUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:31" + }, + { + "contract": "PausableUpgradeable", + "label": "_paused", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol:28" + }, + { + "contract": "PausableUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol:96" + }, + { + "contract": "AccessControlUpgradeable", + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)39_storage)", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:61" + }, + { + "contract": "AccessControlUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:225" + }, + { + "contract": "ERC20Upgradeable", + "label": "_allowances", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", + "src": "contracts/tokens/ERC20Upgradeable.sol:38" + }, + { + "contract": "ERC20Upgradeable", + "label": "_name", + "type": "t_string_storage", + "src": "contracts/tokens/ERC20Upgradeable.sol:40" + }, + { + "contract": "ERC20Upgradeable", + "label": "_symbol", + "type": "t_string_storage", + "src": "contracts/tokens/ERC20Upgradeable.sol:41" + }, + { + "contract": "ERC20Upgradeable", + "label": "_decimals", + "type": "t_uint8", + "src": "contracts/tokens/ERC20Upgradeable.sol:42" + }, + { + "contract": "ERC20Upgradeable", + "label": "__gap", + "type": "t_array(t_uint256)44_storage", + "src": "contracts/tokens/ERC20Upgradeable.sol:225" + }, + { + "contract": "EIP712Upgradeable", + "label": "_HASHED_NAME", + "type": "t_bytes32", + "src": "@openzeppelin/contracts-upgradeable/drafts/EIP712Upgradeable.sol:27" + }, + { + "contract": "EIP712Upgradeable", + "label": "_HASHED_VERSION", + "type": "t_bytes32", + "src": "@openzeppelin/contracts-upgradeable/drafts/EIP712Upgradeable.sol:28" + }, + { + "contract": "EIP712Upgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "@openzeppelin/contracts-upgradeable/drafts/EIP712Upgradeable.sol:120" + }, + { + "contract": "ERC20PermitUpgradeable", + "label": "_nonces", + "type": "t_mapping(t_address,t_struct(Counter)1710_storage)", + "src": "contracts/tokens/ERC20PermitUpgradeable.sol:26" + }, + { + "contract": "ERC20PermitUpgradeable", + "label": "_PERMIT_TYPEHASH", + "type": "t_bytes32", + "src": "contracts/tokens/ERC20PermitUpgradeable.sol:29" + }, + { + "contract": "ERC20PermitUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "contracts/tokens/ERC20PermitUpgradeable.sol:88" + }, + { + "contract": "StakeWiseToken", + "label": "_balances", + "type": "t_mapping(t_address,t_uint256)", + "src": "contracts/tokens/StakeWiseToken.sol:15" + }, + { + "contract": "StakeWiseToken", + "label": "_totalSupply", + "type": "t_uint256", + "src": "contracts/tokens/StakeWiseToken.sol:17" + } + ], + "types": { + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)" + }, + "t_address": { + "label": "address" + }, + "t_uint256": { + "label": "uint256" + }, + "t_mapping(t_address,t_struct(Counter)1710_storage)": { + "label": "mapping(address => struct CountersUpgradeable.Counter)" + }, + "t_struct(Counter)1710_storage": { + "label": "struct CountersUpgradeable.Counter", + "members": [ + { + "label": "_value", + "type": "t_uint256" + } + ] + }, + "t_bytes32": { + "label": "bytes32" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "label": "mapping(address => mapping(address => uint256))" + }, + "t_string_storage": { + "label": "string" + }, + "t_uint8": { + "label": "uint8" + }, + "t_array(t_uint256)44_storage": { + "label": "uint256[44]" + }, + "t_mapping(t_bytes32,t_struct(RoleData)39_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)" + }, + "t_struct(RoleData)39_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_struct(AddressSet)2026_storage" + }, + { + "label": "adminRole", + "type": "t_bytes32" + } + ] + }, + "t_struct(AddressSet)2026_storage": { + "label": "struct EnumerableSetUpgradeable.AddressSet", + "members": [ + { + "label": "_inner", + "type": "t_struct(Set)1761_storage" + } + ] + }, + "t_struct(Set)1761_storage": { + "label": "struct EnumerableSetUpgradeable.Set", + "members": [ + { + "label": "_values", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "label": "_indexes", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ] + }, + "t_array(t_bytes32)dyn_storage": { + "label": "bytes32[]" + }, + "t_mapping(t_bytes32,t_uint256)": { + "label": "mapping(bytes32 => uint256)" + }, + "t_bool": { + "label": "bool" + } + } + } + }, + "de2b2b9599ed08c7b524042f3efbe7c2d5a43aedd25613e6c7d209c01cbbbbd5": { + "address": "0x27356a244cD2a8bBd0A1f4E96E8FCd70bF926Bc3", + "txHash": "0x13ee96fe09831c3409799fa008729cb73efd98f65e43c5115841d42f9cbcaa16", + "layout": { + "storage": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:25" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:30" + }, + { + "contract": "ReentrancyGuardUpgradeable", + "label": "_status", + "type": "t_uint256", + "src": "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol:37" + }, + { + "contract": "ReentrancyGuardUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol:67" + }, + { + "contract": "ContextUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:31" + }, + { + "contract": "PausableUpgradeable", + "label": "_paused", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol:28" + }, + { + "contract": "PausableUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol:96" + }, + { + "contract": "AccessControlUpgradeable", + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)39_storage)", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:61" + }, + { + "contract": "AccessControlUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:225" + }, + { + "contract": "VestingEscrowFactory", + "label": "escrowImplementation", + "type": "t_address", + "src": "contracts/vestings/VestingEscrowFactory.sol:27" + }, + { + "contract": "VestingEscrowFactory", + "label": "escrows", + "type": "t_mapping(t_address,t_array(t_address)dyn_storage)", + "src": "contracts/vestings/VestingEscrowFactory.sol:30" + } + ], + "types": { + "t_address": { + "label": "address" + }, + "t_mapping(t_address,t_array(t_address)dyn_storage)": { + "label": "mapping(address => address[])" + }, + "t_array(t_address)dyn_storage": { + "label": "address[]" + }, + "t_mapping(t_bytes32,t_struct(RoleData)39_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)" + }, + "t_bytes32": { + "label": "bytes32" + }, + "t_struct(RoleData)39_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_struct(AddressSet)2026_storage" + }, + { + "label": "adminRole", + "type": "t_bytes32" + } + ] + }, + "t_struct(AddressSet)2026_storage": { + "label": "struct EnumerableSetUpgradeable.AddressSet", + "members": [ + { + "label": "_inner", + "type": "t_struct(Set)1761_storage" + } + ] + }, + "t_struct(Set)1761_storage": { + "label": "struct EnumerableSetUpgradeable.Set", + "members": [ + { + "label": "_values", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "label": "_indexes", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ] + }, + "t_array(t_bytes32)dyn_storage": { + "label": "bytes32[]" + }, + "t_mapping(t_bytes32,t_uint256)": { + "label": "mapping(bytes32 => uint256)" + }, + "t_uint256": { + "label": "uint256" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]" + }, + "t_bool": { + "label": "bool" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]" + } + } + } + }, + "7e326bc95738472f562a024cfb314277973b02dece8afdcc5ca2556ffbfd9d70": { + "address": "0xbeE3Eb97Cfd94ace6B66E606B8088C57c5f78fBf", + "txHash": "0xa626de677233c869fb99d3ca1c643f2f108655aaae710401e73125ec79385e45", + "layout": { + "storage": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:25" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:30" + }, + { + "contract": "ReentrancyGuardUpgradeable", + "label": "_status", + "type": "t_uint256", + "src": "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol:37" + }, + { + "contract": "ReentrancyGuardUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol:67" + }, + { + "contract": "ContextUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:31" + }, + { + "contract": "PausableUpgradeable", + "label": "_paused", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol:28" + }, + { + "contract": "PausableUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol:96" + }, + { + "contract": "AccessControlUpgradeable", + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)39_storage)", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:61" + }, + { + "contract": "AccessControlUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:225" + }, + { + "contract": "VestingEscrowFactory", + "label": "escrowImplementation", + "type": "t_address", + "src": "contracts/vestings/VestingEscrowFactory.sol:27" + }, + { + "contract": "VestingEscrowFactory", + "label": "escrows", + "type": "t_mapping(t_address,t_array(t_address)dyn_storage)", + "src": "contracts/vestings/VestingEscrowFactory.sol:30" + } + ], + "types": { + "t_address": { + "label": "address" + }, + "t_mapping(t_address,t_array(t_address)dyn_storage)": { + "label": "mapping(address => address[])" + }, + "t_array(t_address)dyn_storage": { + "label": "address[]" + }, + "t_mapping(t_bytes32,t_struct(RoleData)39_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)" + }, + "t_bytes32": { + "label": "bytes32" + }, + "t_struct(RoleData)39_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_struct(AddressSet)2026_storage" + }, + { + "label": "adminRole", + "type": "t_bytes32" + } + ] + }, + "t_struct(AddressSet)2026_storage": { + "label": "struct EnumerableSetUpgradeable.AddressSet", + "members": [ + { + "label": "_inner", + "type": "t_struct(Set)1761_storage" + } + ] + }, + "t_struct(Set)1761_storage": { + "label": "struct EnumerableSetUpgradeable.Set", + "members": [ + { + "label": "_values", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "label": "_indexes", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ] + }, + "t_array(t_bytes32)dyn_storage": { + "label": "bytes32[]" + }, + "t_mapping(t_bytes32,t_uint256)": { + "label": "mapping(bytes32 => uint256)" + }, + "t_uint256": { + "label": "uint256" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]" + }, + "t_bool": { + "label": "bool" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]" + } + } + } } }, "admin": { diff --git a/.openzeppelin/unknown-31337.json b/.openzeppelin/unknown-31337.json index 6bc6e536..4a7afcfb 100644 --- a/.openzeppelin/unknown-31337.json +++ b/.openzeppelin/unknown-31337.json @@ -1100,6 +1100,513 @@ } } } + }, + "92f2fa955a8b14d88f0d6bdccad2dac5752f89ba4a34c06d54a6512633c9c628": { + "address": "0xA28C2d79f0c5B78CeC699DAB0303008179815396", + "txHash": "0x89bdc085721509174aba659d8b9c80d32f86d5ab37c144073636dbe76d6c1e32", + "layout": { + "storage": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:25" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:30" + }, + { + "contract": "ContextUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:31" + }, + { + "contract": "PausableUpgradeable", + "label": "_paused", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol:28" + }, + { + "contract": "PausableUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol:96" + }, + { + "contract": "AccessControlUpgradeable", + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)39_storage)", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:61" + }, + { + "contract": "AccessControlUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:225" + }, + { + "contract": "ERC20Upgradeable", + "label": "_allowances", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", + "src": "contracts/tokens/ERC20Upgradeable.sol:38" + }, + { + "contract": "ERC20Upgradeable", + "label": "_name", + "type": "t_string_storage", + "src": "contracts/tokens/ERC20Upgradeable.sol:40" + }, + { + "contract": "ERC20Upgradeable", + "label": "_symbol", + "type": "t_string_storage", + "src": "contracts/tokens/ERC20Upgradeable.sol:41" + }, + { + "contract": "ERC20Upgradeable", + "label": "_decimals", + "type": "t_uint8", + "src": "contracts/tokens/ERC20Upgradeable.sol:42" + }, + { + "contract": "ERC20Upgradeable", + "label": "__gap", + "type": "t_array(t_uint256)44_storage", + "src": "contracts/tokens/ERC20Upgradeable.sol:225" + }, + { + "contract": "EIP712Upgradeable", + "label": "_HASHED_NAME", + "type": "t_bytes32", + "src": "@openzeppelin/contracts-upgradeable/drafts/EIP712Upgradeable.sol:27" + }, + { + "contract": "EIP712Upgradeable", + "label": "_HASHED_VERSION", + "type": "t_bytes32", + "src": "@openzeppelin/contracts-upgradeable/drafts/EIP712Upgradeable.sol:28" + }, + { + "contract": "EIP712Upgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "@openzeppelin/contracts-upgradeable/drafts/EIP712Upgradeable.sol:120" + }, + { + "contract": "ERC20PermitUpgradeable", + "label": "_nonces", + "type": "t_mapping(t_address,t_struct(Counter)1710_storage)", + "src": "contracts/tokens/ERC20PermitUpgradeable.sol:26" + }, + { + "contract": "ERC20PermitUpgradeable", + "label": "_PERMIT_TYPEHASH", + "type": "t_bytes32", + "src": "contracts/tokens/ERC20PermitUpgradeable.sol:29" + }, + { + "contract": "ERC20PermitUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "contracts/tokens/ERC20PermitUpgradeable.sol:88" + }, + { + "contract": "StakeWiseToken", + "label": "_balances", + "type": "t_mapping(t_address,t_uint256)", + "src": "contracts/tokens/StakeWiseToken.sol:15" + }, + { + "contract": "StakeWiseToken", + "label": "_totalSupply", + "type": "t_uint256", + "src": "contracts/tokens/StakeWiseToken.sol:17" + } + ], + "types": { + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)" + }, + "t_address": { + "label": "address" + }, + "t_uint256": { + "label": "uint256" + }, + "t_mapping(t_address,t_struct(Counter)1710_storage)": { + "label": "mapping(address => struct CountersUpgradeable.Counter)" + }, + "t_struct(Counter)1710_storage": { + "label": "struct CountersUpgradeable.Counter", + "members": [ + { + "label": "_value", + "type": "t_uint256" + } + ] + }, + "t_bytes32": { + "label": "bytes32" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "label": "mapping(address => mapping(address => uint256))" + }, + "t_string_storage": { + "label": "string" + }, + "t_uint8": { + "label": "uint8" + }, + "t_array(t_uint256)44_storage": { + "label": "uint256[44]" + }, + "t_mapping(t_bytes32,t_struct(RoleData)39_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)" + }, + "t_struct(RoleData)39_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_struct(AddressSet)2026_storage" + }, + { + "label": "adminRole", + "type": "t_bytes32" + } + ] + }, + "t_struct(AddressSet)2026_storage": { + "label": "struct EnumerableSetUpgradeable.AddressSet", + "members": [ + { + "label": "_inner", + "type": "t_struct(Set)1761_storage" + } + ] + }, + "t_struct(Set)1761_storage": { + "label": "struct EnumerableSetUpgradeable.Set", + "members": [ + { + "label": "_values", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "label": "_indexes", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ] + }, + "t_array(t_bytes32)dyn_storage": { + "label": "bytes32[]" + }, + "t_mapping(t_bytes32,t_uint256)": { + "label": "mapping(bytes32 => uint256)" + }, + "t_bool": { + "label": "bool" + } + } + } + }, + "de2b2b9599ed08c7b524042f3efbe7c2d5a43aedd25613e6c7d209c01cbbbbd5": { + "address": "0x27356a244cD2a8bBd0A1f4E96E8FCd70bF926Bc3", + "txHash": "0x13ee96fe09831c3409799fa008729cb73efd98f65e43c5115841d42f9cbcaa16", + "layout": { + "storage": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:25" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:30" + }, + { + "contract": "ReentrancyGuardUpgradeable", + "label": "_status", + "type": "t_uint256", + "src": "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol:37" + }, + { + "contract": "ReentrancyGuardUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol:67" + }, + { + "contract": "ContextUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:31" + }, + { + "contract": "PausableUpgradeable", + "label": "_paused", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol:28" + }, + { + "contract": "PausableUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol:96" + }, + { + "contract": "AccessControlUpgradeable", + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)39_storage)", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:61" + }, + { + "contract": "AccessControlUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:225" + }, + { + "contract": "VestingEscrowFactory", + "label": "escrowImplementation", + "type": "t_address", + "src": "contracts/vestings/VestingEscrowFactory.sol:27" + }, + { + "contract": "VestingEscrowFactory", + "label": "escrows", + "type": "t_mapping(t_address,t_array(t_address)dyn_storage)", + "src": "contracts/vestings/VestingEscrowFactory.sol:30" + } + ], + "types": { + "t_address": { + "label": "address" + }, + "t_mapping(t_address,t_array(t_address)dyn_storage)": { + "label": "mapping(address => address[])" + }, + "t_array(t_address)dyn_storage": { + "label": "address[]" + }, + "t_mapping(t_bytes32,t_struct(RoleData)39_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)" + }, + "t_bytes32": { + "label": "bytes32" + }, + "t_struct(RoleData)39_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_struct(AddressSet)2026_storage" + }, + { + "label": "adminRole", + "type": "t_bytes32" + } + ] + }, + "t_struct(AddressSet)2026_storage": { + "label": "struct EnumerableSetUpgradeable.AddressSet", + "members": [ + { + "label": "_inner", + "type": "t_struct(Set)1761_storage" + } + ] + }, + "t_struct(Set)1761_storage": { + "label": "struct EnumerableSetUpgradeable.Set", + "members": [ + { + "label": "_values", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "label": "_indexes", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ] + }, + "t_array(t_bytes32)dyn_storage": { + "label": "bytes32[]" + }, + "t_mapping(t_bytes32,t_uint256)": { + "label": "mapping(bytes32 => uint256)" + }, + "t_uint256": { + "label": "uint256" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]" + }, + "t_bool": { + "label": "bool" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]" + } + } + } + }, + "7e326bc95738472f562a024cfb314277973b02dece8afdcc5ca2556ffbfd9d70": { + "address": "0xbeE3Eb97Cfd94ace6B66E606B8088C57c5f78fBf", + "txHash": "0xa626de677233c869fb99d3ca1c643f2f108655aaae710401e73125ec79385e45", + "layout": { + "storage": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:25" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:30" + }, + { + "contract": "ReentrancyGuardUpgradeable", + "label": "_status", + "type": "t_uint256", + "src": "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol:37" + }, + { + "contract": "ReentrancyGuardUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol:67" + }, + { + "contract": "ContextUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:31" + }, + { + "contract": "PausableUpgradeable", + "label": "_paused", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol:28" + }, + { + "contract": "PausableUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol:96" + }, + { + "contract": "AccessControlUpgradeable", + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)39_storage)", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:61" + }, + { + "contract": "AccessControlUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:225" + }, + { + "contract": "VestingEscrowFactory", + "label": "escrowImplementation", + "type": "t_address", + "src": "contracts/vestings/VestingEscrowFactory.sol:27" + }, + { + "contract": "VestingEscrowFactory", + "label": "escrows", + "type": "t_mapping(t_address,t_array(t_address)dyn_storage)", + "src": "contracts/vestings/VestingEscrowFactory.sol:30" + } + ], + "types": { + "t_address": { + "label": "address" + }, + "t_mapping(t_address,t_array(t_address)dyn_storage)": { + "label": "mapping(address => address[])" + }, + "t_array(t_address)dyn_storage": { + "label": "address[]" + }, + "t_mapping(t_bytes32,t_struct(RoleData)39_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)" + }, + "t_bytes32": { + "label": "bytes32" + }, + "t_struct(RoleData)39_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_struct(AddressSet)2026_storage" + }, + { + "label": "adminRole", + "type": "t_bytes32" + } + ] + }, + "t_struct(AddressSet)2026_storage": { + "label": "struct EnumerableSetUpgradeable.AddressSet", + "members": [ + { + "label": "_inner", + "type": "t_struct(Set)1761_storage" + } + ] + }, + "t_struct(Set)1761_storage": { + "label": "struct EnumerableSetUpgradeable.Set", + "members": [ + { + "label": "_values", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "label": "_indexes", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ] + }, + "t_array(t_bytes32)dyn_storage": { + "label": "bytes32[]" + }, + "t_mapping(t_bytes32,t_uint256)": { + "label": "mapping(bytes32 => uint256)" + }, + "t_uint256": { + "label": "uint256" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]" + }, + "t_bool": { + "label": "bool" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]" + } + } + } } }, "admin": { diff --git a/abi/MerkleDrop.json b/abi/MerkleDrop.json index c2b43d53..12095f36 100644 --- a/abi/MerkleDrop.json +++ b/abi/MerkleDrop.json @@ -1,6 +1,11 @@ [ { "inputs": [ + { + "internalType": "address", + "name": "_owner", + "type": "address" + }, { "internalType": "address", "name": "_token", diff --git a/abi/VestingEscrow.json b/abi/VestingEscrow.json index a6e3b4c1..514295e5 100644 --- a/abi/VestingEscrow.json +++ b/abi/VestingEscrow.json @@ -203,12 +203,20 @@ "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "beneficiary", + "outputs": [ { "internalType": "address", - "name": "beneficiary", + "name": "", "type": "address" - }, + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ { "internalType": "uint256", "name": "amount", @@ -380,6 +388,11 @@ "name": "_recipient", "type": "address" }, + { + "internalType": "address", + "name": "_beneficiary", + "type": "address" + }, { "internalType": "uint256", "name": "_totalAmount", @@ -556,7 +569,7 @@ "inputs": [ { "internalType": "address", - "name": "beneficiary", + "name": "_beneficiary", "type": "address" } ], diff --git a/abi/VestingEscrowFactory.json b/abi/VestingEscrowFactory.json index 78e2b3e8..09e29560 100644 --- a/abi/VestingEscrowFactory.json +++ b/abi/VestingEscrowFactory.json @@ -121,6 +121,12 @@ "name": "recipient", "type": "address" }, + { + "indexed": false, + "internalType": "address", + "name": "beneficiary", + "type": "address" + }, { "indexed": false, "internalType": "address", @@ -238,6 +244,11 @@ "name": "recipient", "type": "address" }, + { + "internalType": "address", + "name": "beneficiary", + "type": "address" + }, { "internalType": "uint256", "name": "amount", @@ -387,24 +398,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "_admin", - "type": "address" - }, - { - "internalType": "address", - "name": "_escrowImplementation", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { @@ -531,5 +524,18 @@ "outputs": [], "stateMutability": "nonpayable", "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_escrowImplementation", + "type": "address" + } + ], + "name": "upgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" } ] diff --git a/audits/14-01-2021-RuntimeVerification.pdf b/audits/14-01-2021-RuntimeVerification.pdf new file mode 100644 index 00000000..01a3847e Binary files /dev/null and b/audits/14-01-2021-RuntimeVerification.pdf differ diff --git a/audits/18-04-2021-Certik.pdf b/audits/18-04-2021-Certik.pdf new file mode 100644 index 00000000..b9331d68 Binary files /dev/null and b/audits/18-04-2021-Certik.pdf differ diff --git a/contracts/interfaces/IVestingEscrow.sol b/contracts/interfaces/IVestingEscrow.sol index e632182a..4b1e006f 100644 --- a/contracts/interfaces/IVestingEscrow.sol +++ b/contracts/interfaces/IVestingEscrow.sol @@ -29,6 +29,7 @@ interface IVestingEscrow { * @param _admin - address of the contract admin. * @param _token - address of the token. * @param _recipient - address of the recipient of the tokens. + * @param _beneficiary - address of the tokens beneficiary. * @param _totalAmount - amount of tokens to vest. * @param _startTime - start timestamp of the vesting in seconds. * @param _endTime - end timestamp of the vesting in seconds. @@ -38,6 +39,7 @@ interface IVestingEscrow { address _admin, address _token, address _recipient, + address _beneficiary, uint256 _totalAmount, uint256 _startTime, uint256 _endTime, @@ -64,6 +66,11 @@ interface IVestingEscrow { */ function recipient() external view returns (address); + /** + * @dev Function for fetching the beneficiary address. + */ + function beneficiary() external view returns (address); + /** * @dev Function for fetching the total vested amount. */ @@ -91,16 +98,15 @@ interface IVestingEscrow { /** * @dev Function for stopping the vesting contract. - * Can be called only by admin. The unvested tokens will be transferred to the beneficiary address. - * @param beneficiary - address of the unvested tokens recipient. + * Can be called only by admin. The unvested tokens will be transferred to the `_beneficiary` address. + * @param _beneficiary - address of the unvested tokens recipient. */ - function stop(address beneficiary) external; + function stop(address _beneficiary) external; /** * @dev Function for claiming the vested tokens. * Can be called only by the tokens recipient. The amount claimed must be vested by the time of calling. - * @param beneficiary - address of the tokens recipient. * @param amount - amount of tokens to claim. */ - function claim(address beneficiary, uint256 amount) external; + function claim(uint256 amount) external; } diff --git a/contracts/interfaces/IVestingEscrowFactory.sol b/contracts/interfaces/IVestingEscrowFactory.sol index 5bbbc2ba..01c70628 100644 --- a/contracts/interfaces/IVestingEscrowFactory.sol +++ b/contracts/interfaces/IVestingEscrowFactory.sol @@ -11,6 +11,7 @@ interface IVestingEscrowFactory { * @param admin - address of the contract admin. * @param token - address of the token. * @param recipient - address of the recipient of the tokens. + * @param beneficiary - address of the tokens beneficiary. * @param escrow - address of the escrow contract. * @param totalAmount - amount of tokens to vest. * @param startTime - start timestamp of the vesting in seconds. @@ -21,6 +22,7 @@ interface IVestingEscrowFactory { address indexed admin, address indexed token, address indexed recipient, + address beneficiary, address escrow, uint256 totalAmount, uint256 startTime, @@ -29,11 +31,10 @@ interface IVestingEscrowFactory { ); /** - * @dev Constructor for initializing the VestingEscrowFactory contract. - * @param _admin - address of the contract admin. + * @dev Function for upgrading the VestingEscrowFactory contract. * @param _escrowImplementation - address of the VestingEscrow implementation contract. */ - function initialize(address _admin, address _escrowImplementation) external; + function upgrade(address _escrowImplementation) external; /** * @dev Function for fetching escrow implementation contract. @@ -50,6 +51,7 @@ interface IVestingEscrowFactory { * @dev Function for deploying new escrow contract. * @param token - address of the token contract. * @param recipient - address of the recipient of the tokens. + * @param beneficiary - address where the tokens will be sent. * @param amount - amount of tokens to vest. * @param vestingStart - start timestamp of the vesting in seconds. * @param vestingDuration - vesting duration in seconds. @@ -58,6 +60,7 @@ interface IVestingEscrowFactory { function deployEscrow( address token, address recipient, + address beneficiary, uint256 amount, uint256 vestingStart, uint256 vestingDuration, diff --git a/contracts/vestings/VestingEscrow.sol b/contracts/vestings/VestingEscrow.sol index 19446121..33eb558a 100644 --- a/contracts/vestings/VestingEscrow.sol +++ b/contracts/vestings/VestingEscrow.sol @@ -25,6 +25,9 @@ contract VestingEscrow is IVestingEscrow, OwnablePausableUpgradeable { // @dev Address of the recipient. address public override recipient; + // @dev Address of the beneficiary. + address public override beneficiary; + // @dev Total amount vested. uint256 public override totalAmount; @@ -47,6 +50,7 @@ contract VestingEscrow is IVestingEscrow, OwnablePausableUpgradeable { address _admin, address _token, address _recipient, + address _beneficiary, uint256 _totalAmount, uint256 _startTime, uint256 _endTime, @@ -57,6 +61,7 @@ contract VestingEscrow is IVestingEscrow, OwnablePausableUpgradeable { __OwnablePausableUpgradeable_init(_admin); token = IERC20(_token); recipient = _recipient; + beneficiary = _beneficiary; totalAmount = _totalAmount; startTime = _startTime; endTime = _endTime; @@ -87,8 +92,8 @@ contract VestingEscrow is IVestingEscrow, OwnablePausableUpgradeable { /** * @dev See {IVestingEscrow-stop}. */ - function stop(address beneficiary) external override onlyAdmin { - require(beneficiary != address(0), "PoolEscrow: beneficiary is the zero address"); + function stop(address _beneficiary) external override onlyAdmin { + require(_beneficiary != address(0), "PoolEscrow: beneficiary is the zero address"); uint256 _totalAmount = totalAmount; uint256 pulledAmount = _totalAmount.sub(claimedAmount); require(pulledAmount > 0, "VestingEscrow: nothing to pull"); @@ -97,15 +102,14 @@ contract VestingEscrow is IVestingEscrow, OwnablePausableUpgradeable { endTime = block.timestamp; claimedAmount = _totalAmount; - emit Stopped(msg.sender, beneficiary, pulledAmount); - token.safeTransfer(beneficiary, pulledAmount); + emit Stopped(msg.sender, _beneficiary, pulledAmount); + token.safeTransfer(_beneficiary, pulledAmount); } /** * @dev See {IVestingEscrow-claim}. */ - function claim(address beneficiary, uint256 amount) external override whenNotPaused { - require(beneficiary != address(0), "PoolEscrow: beneficiary is the zero address"); + function claim(uint256 amount) external override whenNotPaused { require(msg.sender == recipient, "VestingEscrow: access denied"); require(amount > 0, "VestingEscrow: amount is zero"); @@ -113,8 +117,9 @@ contract VestingEscrow is IVestingEscrow, OwnablePausableUpgradeable { uint256 claimable = vestedAmount().sub(_claimedAmount); require(claimable >= amount, "VestingEscrow: invalid amount"); + address _beneficiary = beneficiary; claimedAmount = _claimedAmount.add(amount); - emit Claimed(msg.sender, beneficiary, amount); - token.safeTransfer(beneficiary, amount); + emit Claimed(msg.sender, _beneficiary, amount); + token.safeTransfer(_beneficiary, amount); } } diff --git a/contracts/vestings/VestingEscrowFactory.sol b/contracts/vestings/VestingEscrowFactory.sol index 1f9664e6..499e32ab 100644 --- a/contracts/vestings/VestingEscrowFactory.sol +++ b/contracts/vestings/VestingEscrowFactory.sol @@ -30,10 +30,12 @@ contract VestingEscrowFactory is IVestingEscrowFactory, ReentrancyGuardUpgradeab mapping(address => address[]) private escrows; /** - * @dev See {IVestingEscrowFactory-initialize}. - */ - function initialize(address _admin, address _escrowImplementation) external override initializer { - __OwnablePausableUpgradeable_init(_admin); + * @dev See {IVestingEscrowFactory-upgrade}. + * The `initialize` must be called before upgrading in previous implementation contract: + * https://github.com/stakewise/contracts/blob/f865adf3b90818e6d8b9d8af01080842fb24aa16/contracts/vestings/VestingEscrowFactory.sol#L35 + */ + function upgrade(address _escrowImplementation) external override onlyAdmin whenPaused { + require(_escrowImplementation != escrowImplementation, "VestingEscrowFactory: already upgraded"); escrowImplementation = _escrowImplementation; } @@ -53,6 +55,7 @@ contract VestingEscrowFactory is IVestingEscrowFactory, ReentrancyGuardUpgradeab function deployEscrow( address token, address recipient, + address beneficiary, uint256 amount, uint256 vestingStart, uint256 vestingDuration, @@ -62,6 +65,7 @@ contract VestingEscrowFactory is IVestingEscrowFactory, ReentrancyGuardUpgradeab { require(cliffLength <= vestingDuration, "VestingEscrowFactory: invalid cliff"); require(recipient != address(0), "PoolEscrow: recipient is the zero address"); + require(beneficiary != address(0), "PoolEscrow: beneficiary is the zero address"); IERC20Upgradeable(token).safeTransferFrom(msg.sender, address(this), amount); @@ -76,6 +80,7 @@ contract VestingEscrowFactory is IVestingEscrowFactory, ReentrancyGuardUpgradeab msg.sender, token, recipient, + beneficiary, amount, vestingStart, vestingEnd, @@ -85,6 +90,7 @@ contract VestingEscrowFactory is IVestingEscrowFactory, ReentrancyGuardUpgradeab msg.sender, token, recipient, + beneficiary, escrow, amount, vestingStart, diff --git a/deployments/collectors.js b/deployments/collectors.js deleted file mode 100644 index 48ce5533..00000000 --- a/deployments/collectors.js +++ /dev/null @@ -1,12 +0,0 @@ -const { ethers } = require('hardhat'); - -async function deployPoolEscrow(adminAddress) { - const PoolEscrow = await ethers.getContractFactory('PoolEscrow'); - const poolEscrow = await PoolEscrow.deploy(adminAddress); - await poolEscrow.deployed(); - return poolEscrow.address; -} - -module.exports = { - deployPoolEscrow, -}; diff --git a/deployments/index.js b/deployments/index.js index 680e67a5..f88f0646 100644 --- a/deployments/index.js +++ b/deployments/index.js @@ -1,12 +1,5 @@ const hre = require('hardhat'); -const { deployPoolEscrow } = require('./collectors'); -const { white, green } = require('chalk'); -const { contractSettings, contracts } = require('./settings'); -const { deployAndInitializeStakeWiseToken } = require('./tokens'); -const { - deployVestingEscrow, - deployAndInitializeVestingEscrowFactory, -} = require('./vestings'); +const { contracts } = require('./settings'); function log(message) { if (hre.config != null && hre.config.suppressLogs !== true) { @@ -15,54 +8,12 @@ function log(message) { } async function prepareContractsUpgrades() { - log(white('Nothing to prepare...')); + log('Nothing to prepare...'); } async function upgradeContracts() { - let stakeWiseTokenContractAddress = await deployAndInitializeStakeWiseToken( - contractSettings.admin - ); - log( - white( - `Deployed StakeWise token contract: ${green( - stakeWiseTokenContractAddress - )}` - ) - ); - - let vestingEscrowContractAddress = await deployVestingEscrow(); - log( - white( - `Deployed VestingEscrow contract: ${green(vestingEscrowContractAddress)}` - ) - ); - - let vestingEscrowFactoryContractAddress = await deployAndInitializeVestingEscrowFactory( - contractSettings.admin, - vestingEscrowContractAddress - ); - log( - white( - `Deployed VestingEscrow Factory contract: ${green( - vestingEscrowFactoryContractAddress - )}` - ) - ); - - let poolEscrowContractAddress = await deployPoolEscrow( - contractSettings.admin - ); - log( - white(`Deployed PoolEscrow contract: ${green(poolEscrowContractAddress)}`) - ); - - return { - ...contracts, - vestingEscrowFactory: vestingEscrowFactoryContractAddress, - vestingEscrow: vestingEscrowContractAddress, - poolEscrow: poolEscrowContractAddress, - stakeWiseToken: stakeWiseTokenContractAddress, - }; + log('Nothing to upgrade...'); + return contracts; } module.exports = { diff --git a/deployments/settings.js b/deployments/settings.js index 10f7a09a..2fa092b6 100644 --- a/deployments/settings.js +++ b/deployments/settings.js @@ -6,11 +6,16 @@ if (hre.hardhatArguments && hre.hardhatArguments.network === 'goerli') { validators: '0xE2F13059454b626e42e04845815E9Ed2E9774bF3', oracles: '0xE54486fa4eB45716c5725d7A46FDDe810B8E8914', pool: '0x8c1EfEcFb5c4F1099AB0460b5659342943764Df7', + poolEscrow: '0x040F15C6b5Bfc5F324eCaB5864C38D4e1EEF4218', solos: '0xcf809A020EE599034C010b387F2116237a5B22Bc', stakedEthToken: '0x221D9812823DBAb0F1fB40b0D294D9875980Ac19', rewardEthToken: '0x826f88d423440c305D9096cC1581Ae751eFCAfB0', + stakeWiseToken: '0x0e2497aACec2755d831E4AFDEA25B4ef1B823855', + vestingEscrowFactory: '0xbA91cdD484893c1f8F75DB55733ccaDcd0fE5f59', + merkleDrop: '0xFc3513E92799F0169e5f14F354d0097E4b790498', proxyAdmin: '0xbba3f4dDD4F705aD2028ee2da64fF3166bDe8cA8', }; + contractSettings = { cancelLockDuration: '86400', // 1 day oraclesSyncPeriod: '86400', // 1 day @@ -19,6 +24,7 @@ if (hre.hardhatArguments && hre.hardhatArguments.network === 'goerli') { admin: '0x1867c96601bc5fE24F685d112314B8F3Fe228D5A', maintainer: '0x1867c96601bc5fE24F685d112314B8F3Fe228D5A', VRC: '0x8c5fecdC472E27Bc447696F431E425D02dd46a8c', + vestingEscrow: '0x4CDAe3f1Eaa84b88fFc97627Ef1c77F762794287', withdrawalCredentials: '0x003e294ffc37978496f1b9298d5984ad4d55d4e2d1e6a06ee6904810c7b9e0d5', activatedValidators: '0', @@ -27,6 +33,20 @@ if (hre.hardhatArguments && hre.hardhatArguments.network === 'goerli') { pendingValidatorsLimit: '500', // 5 % }; } else { + contracts = { + validators: '0xaAc73D4A26Ae6906aa115118b7840b1F19fcd3A5', + oracles: '0x2f1C5E86B13a74f5A6E7B4b35DD77fe29Aa47514', + pool: '0xC874b064f465bdD6411D45734b56fac750Cda29A', + poolEscrow: '0x2296e122c1a20Fca3CAc3371357BdAd3be0dF079', + solos: '0xEadCBA8BF9ACA93F627F31fB05470F5A0686CEca', + stakedEthToken: '0xFe2e637202056d30016725477c5da089Ab0A043A', + rewardEthToken: '0x20BC832ca081b91433ff6c17f85701B6e92486c5', + stakeWiseToken: '0x48C3399719B582dD63eB5AADf12A40B4C3f52FA2', + vestingEscrowFactory: '0x7B910cc3D4B42FEFF056218bD56d7700E4ea7dD5', + merkleDrop: '0x2AAB6822a1a9f982fd7b0Fe35A5A5b6148eCf4d5', + proxyAdmin: '0x3EB0175dcD67d3AB139aA03165e24AA2188A4C22', + }; + contractSettings = { cancelLockDuration: '86400', // 1 day oraclesSyncPeriod: '86400', // 1 day @@ -35,23 +55,14 @@ if (hre.hardhatArguments && hre.hardhatArguments.network === 'goerli') { admin: '0x144a98cb1CdBb23610501fE6108858D9B7D24934', maintainer: '0xf91AA4a655B6F43243ed4C2853F3508314DaA2aB', VRC: '0x00000000219ab540356cbb839cbe05303d7705fa', + vestingEscrow: '0x1E6d872CE26C8711e7D47b8E0C47aB91d95a6dF3', withdrawalCredentials: - '0x003e294ffc37978496f1b9298d5984ad4d55d4e2d1e6a06ee6904810c7b9e0d5', - activatedValidators: '569', - pendingValidators: '1', + '0x0100000000000000000000002296e122c1a20fca3cac3371357bdad3be0df079', + activatedValidators: '619', + pendingValidators: '4', minActivatingDeposit: '32000000000000000000', // 32 ETH pendingValidatorsLimit: '500', // 5 % }; - - contracts = { - validators: '0xaAc73D4A26Ae6906aa115118b7840b1F19fcd3A5', - oracles: '0x2f1C5E86B13a74f5A6E7B4b35DD77fe29Aa47514', - pool: '0xC874b064f465bdD6411D45734b56fac750Cda29A', - solos: '0xEadCBA8BF9ACA93F627F31fB05470F5A0686CEca', - stakedEthToken: '0xFe2e637202056d30016725477c5da089Ab0A043A', - rewardEthToken: '0x20BC832ca081b91433ff6c17f85701B6e92486c5', - proxyAdmin: '0x3EB0175dcD67d3AB139aA03165e24AA2188A4C22', - }; } module.exports = { diff --git a/deployments/tokens.js b/deployments/tokens.js deleted file mode 100644 index fdfc11e6..00000000 --- a/deployments/tokens.js +++ /dev/null @@ -1,25 +0,0 @@ -const { ethers, upgrades } = require('hardhat'); - -async function deployAndInitializeERC20Mock( - ownerAddress, - name, - symbol, - totalSupply = '100000000000000000000000000' // 100000000 ETH -) { - const ERC20Mock = await ethers.getContractFactory('ERC20Mock'); - const erc20Mock = await ERC20Mock.deploy(); - await erc20Mock.initialize(ownerAddress, totalSupply, name, symbol); - return erc20Mock.address; -} - -async function deployAndInitializeStakeWiseToken(adminAddress) { - const StakeWiseToken = await ethers.getContractFactory('StakeWiseToken'); - const proxy = await upgrades.deployProxy(StakeWiseToken, [adminAddress]); - await proxy.deployed(); - return proxy.address; -} - -module.exports = { - deployAndInitializeERC20Mock, - deployAndInitializeStakeWiseToken, -}; diff --git a/deployments/utils.js b/deployments/utils.js deleted file mode 100644 index 8d43fb40..00000000 --- a/deployments/utils.js +++ /dev/null @@ -1,55 +0,0 @@ -const hre = require('hardhat'); -const { BigNumber } = require('ethers'); -const { deploy } = require('@openzeppelin/hardhat-upgrades/dist/utils/deploy'); -const { - readValidations, -} = require('@openzeppelin/hardhat-upgrades/dist/validations'); -const { - assertUpgradeSafe, - fetchOrDeploy, - getStorageLayout, - getStorageLayoutForAddress, - getImplementationAddress, - getVersion, - getUnlinkedBytecode, - Manifest, -} = require('@openzeppelin/upgrades-core'); - -function calculateGasMargin(value) { - return value - .mul(BigNumber.from(10000)) - .add(BigNumber.from(1000)) - .div(BigNumber.from(10000)); -} - -// overrides: https://github.com/OpenZeppelin/openzeppelin-upgrades/blob/%40openzeppelin/hardhat-upgrades%401.6.0/packages/plugin-hardhat/src/upgrade-proxy.ts#L34 -async function prepareUpgrade(contract, contractAddress) { - const { provider } = hre.network; - const manifest = await Manifest.forNetwork(provider); - - const validations = await readValidations(hre); - - const unlinkedBytecode = getUnlinkedBytecode(validations, contract.bytecode); - const version = getVersion(unlinkedBytecode, contract.bytecode); - assertUpgradeSafe(validations, version, {}); - - const currentImplAddress = await getImplementationAddress( - provider, - contractAddress - ); - await getStorageLayoutForAddress(manifest, validations, currentImplAddress); - const layout = getStorageLayout(validations, version); - - // skip storage check as it contains variable rename - // TODO: re-enable in future upgrades - - return await fetchOrDeploy(version, provider, async () => { - const deployment = await deploy(contract); - return { ...deployment, layout }; - }); -} - -module.exports = { - calculateGasMargin, - prepareUpgrade, -}; diff --git a/deployments/vestings.js b/deployments/vestings.js deleted file mode 100644 index 470b2670..00000000 --- a/deployments/vestings.js +++ /dev/null @@ -1,29 +0,0 @@ -const { ethers, upgrades } = require('hardhat'); - -async function deployAndInitializeVestingEscrowFactory( - adminAddress, - escrowImplementationAddress -) { - const VestingEscrowFactory = await ethers.getContractFactory( - 'VestingEscrowFactory' - ); - const proxy = await upgrades.deployProxy(VestingEscrowFactory, [ - adminAddress, - escrowImplementationAddress, - ]); - await proxy.deployed(); - return proxy.address; -} - -async function deployVestingEscrow() { - // VestingEscrow is deployed without initialization as its clones are initialized - const VestingEscrow = await ethers.getContractFactory('VestingEscrow'); - const vestingEscrow = await VestingEscrow.deploy(); - await vestingEscrow.deployed(); - return vestingEscrow.address; -} - -module.exports = { - deployVestingEscrow, - deployAndInitializeVestingEscrowFactory, -}; diff --git a/hardhat.config.js b/hardhat.config.js index dc447c3b..20956f67 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -11,7 +11,7 @@ require('hardhat-abi-exporter'); require('@nomiclabs/hardhat-etherscan'); const GAS_PRICE = 20e9; // 20 Gwei -const BLOCK_NUMBER = 12122895; +const BLOCK_NUMBER = 12290000; const OPTIMIZER_RUNS = 5000000; const log = (...text) => console.log(gray(...['└─> [DEBUG]'].concat(text))); diff --git a/networks/goerli.md b/networks/goerli.md index 2d1f9310..1d29da08 100644 --- a/networks/goerli.md +++ b/networks/goerli.md @@ -15,6 +15,11 @@ - Implementation: [0xAB10021EA5d14156f52414C492bf81859d0b21F6](https://goerli.etherscan.io/address/0xAB10021EA5d14156f52414C492bf81859d0b21F6) - Transaction: [0xe71758c8df2927dac4f8c3854cbefd5fa73d95dcde38d68a91718d7a702b0dc5](https://goerli.etherscan.io/tx/0xe71758c8df2927dac4f8c3854cbefd5fa73d95dcde38d68a91718d7a702b0dc5) +## Pool Escrow + +- Contract: [0x040F15C6b5Bfc5F324eCaB5864C38D4e1EEF4218](https://goerli.etherscan.io/address/0x040f15c6b5bfc5f324ecab5864c38d4e1eef4218) +- Transaction: [0x7d0aa2f273c715ee913ffc45a1f830faac52fb84bf384b6fa3ac58308f375602](https://goerli.etherscan.io/tx/0x7d0aa2f273c715ee913ffc45a1f830faac52fb84bf384b6fa3ac58308f375602) + ## Solos - Contract: [0xcf809A020EE599034C010b387F2116237a5B22Bc](https://goerli.etherscan.io/address/0xcf809A020EE599034C010b387F2116237a5B22Bc) @@ -30,6 +35,11 @@ - Contract: [0x826f88d423440c305D9096cC1581Ae751eFCAfB0](https://goerli.etherscan.io/address/0x826f88d423440c305D9096cC1581Ae751eFCAfB0) - Transaction: [0xdf77776425e06f9d045c33315ed8223dd274abf807687158a39bd34556dd01a6](https://goerli.etherscan.io/tx/0xdf77776425e06f9d045c33315ed8223dd274abf807687158a39bd34556dd01a6) +## StakeWiseToken + +- Contract: [0x0e2497aACec2755d831E4AFDEA25B4ef1B823855](https://goerli.etherscan.io/address/0x0e2497aACec2755d831E4AFDEA25B4ef1B823855) +- Transaction: [0xa4e348e58f8144e3cf6973983001e7fb6e74f0bb423f5a37ba87c686cf178314](https://goerli.etherscan.io/tx/0xa4e348e58f8144e3cf6973983001e7fb6e74f0bb423f5a37ba87c686cf178314) + ## Oracles - Contract: [0xE54486fa4eB45716c5725d7A46FDDe810B8E8914](https://goerli.etherscan.io/address/0xE54486fa4eB45716c5725d7A46FDDe810B8E8914) @@ -40,6 +50,31 @@ - Implementation: [0x35e467609D1982BCd7EcAff4e3f1fb22640CF4EF](https://goerli.etherscan.io/address/0x35e467609D1982BCd7EcAff4e3f1fb22640CF4EF) - Transaction: [0x3922f5ae602033e445f8e191c522d4696a7834c83a03dbb7b548975e6734d015](https://goerli.etherscan.io/tx/0x3922f5ae602033e445f8e191c522d4696a7834c83a03dbb7b548975e6734d015) +## Vesting Escrow + +- Contract: [0xBe8D03Dcf686C7C6238F5051bB136f503b05F1D7](https://goerli.etherscan.io/address/0xBe8D03Dcf686C7C6238F5051bB136f503b05F1D7) +- Transaction: [0x198eef94502833548d05f7db95b221d14ec56632cd8b1e59264aca3c5f4387af](https://goerli.etherscan.io/tx/0x198eef94502833548d05f7db95b221d14ec56632cd8b1e59264aca3c5f4387af) + +### Upgrade to v1.2.0 + +- Contract: [0x4CDAe3f1Eaa84b88fFc97627Ef1c77F762794287](https://goerli.etherscan.io/address/0x4CDAe3f1Eaa84b88fFc97627Ef1c77F762794287) +- Transaction: [0xba1f3ec69339c82becc103ab2df7ee1d9e08e5a49d4aa99df77cbcee508cc117](https://goerli.etherscan.io/tx/0xba1f3ec69339c82becc103ab2df7ee1d9e08e5a49d4aa99df77cbcee508cc117) + +## Vesting Escrow Factory + +- Contract: [0xbA91cdD484893c1f8F75DB55733ccaDcd0fE5f59](https://goerli.etherscan.io/address/0xbA91cdD484893c1f8F75DB55733ccaDcd0fE5f59) +- Transaction: [0xdcb1d1dfbb6a0bdfe5f2dfd9cc83a91f1a3e0fefd6c655f3afa6f3a29a012d7f](https://goerli.etherscan.io/tx/0xdcb1d1dfbb6a0bdfe5f2dfd9cc83a91f1a3e0fefd6c655f3afa6f3a29a012d7f) + +### Upgrade to v1.2.0 + +- Implementation: [0x1BBf89F4Dc9913FCC14EF5A336A1d8C23Ccb74E3](https://goerli.etherscan.io/address/0x1BBf89F4Dc9913FCC14EF5A336A1d8C23Ccb74E3) +- Transaction: [0x9a025ca1b53cb6bb3f0ab8c5ebf361c44d6ca526f24c5b433d77b4f81ccd5044](https://goerli.etherscan.io/tx/0x9a025ca1b53cb6bb3f0ab8c5ebf361c44d6ca526f24c5b433d77b4f81ccd5044) + +## Early Adopters Campaign (Merkle Drop) + +- Contract: [0xFc3513E92799F0169e5f14F354d0097E4b790498](https://goerli.etherscan.io/address/0xFc3513E92799F0169e5f14F354d0097E4b790498) +- Transaction: [0x0a2c0ec55c6527367f420cbf2dc9434eb05263d2f982a10c48f59d9bfaaadab0](https://goerli.etherscan.io/tx/0x0a2c0ec55c6527367f420cbf2dc9434eb05263d2f982a10c48f59d9bfaaadab0) + ## Proxy Admin - Implementation: [0xbba3f4dDD4F705aD2028ee2da64fF3166bDe8cA8](https://goerli.etherscan.io/address/0xbba3f4dDD4F705aD2028ee2da64fF3166bDe8cA8) diff --git a/networks/mainnet.md b/networks/mainnet.md index 210d54b1..eb0c35cb 100644 --- a/networks/mainnet.md +++ b/networks/mainnet.md @@ -15,6 +15,11 @@ - Implementation: [0xc8970E7C07c251625F9F93cE510b1D9c1a08d299](https://etherscan.io/address/0xc8970E7C07c251625F9F93cE510b1D9c1a08d299) - Transaction: [0x32c727ebb5dbbc1bd89a3a21cf15d9e74dbc688b404b60a286a9ae858c4967e2](https://etherscan.io/tx/0x32c727ebb5dbbc1bd89a3a21cf15d9e74dbc688b404b60a286a9ae858c4967e2) +## Pool Escrow + +- Contract: [0x2296e122c1a20Fca3CAc3371357BdAd3be0dF079](https://etherscan.io/address/0x2296e122c1a20Fca3CAc3371357BdAd3be0dF079) +- Transaction: [0xaf485028fa48fe546a72d0a26c8ea8adc6ae0c460faa3b5fab7513834c0e1155](https://etherscan.io/tx/0xaf485028fa48fe546a72d0a26c8ea8adc6ae0c460faa3b5fab7513834c0e1155) + ## Solos - Contract: [0xEadCBA8BF9ACA93F627F31fB05470F5A0686CEca](https://etherscan.io/address/0xEadCBA8BF9ACA93F627F31fB05470F5A0686CEca) @@ -30,6 +35,11 @@ - Contract: [0x20BC832ca081b91433ff6c17f85701B6e92486c5](https://etherscan.io/address/0x20BC832ca081b91433ff6c17f85701B6e92486c5) - Transaction: [0x7862156d832b88c96ebaad89570422b4dfb6ef10dd4f6f45798c583eec9f7db9](https://etherscan.io/tx/0x7862156d832b88c96ebaad89570422b4dfb6ef10dd4f6f45798c583eec9f7db9) +## StakeWiseToken + +- Contract: [0x48C3399719B582dD63eB5AADf12A40B4C3f52FA2](https://etherscan.io/address/0x48C3399719B582dD63eB5AADf12A40B4C3f52FA2) +- Transaction: [0x2ea1150808638522d935c7d66b6d67782389b5123682ca466c9b97ac0eb0c050](https://etherscan.io/tx/0x2ea1150808638522d935c7d66b6d67782389b5123682ca466c9b97ac0eb0c050) + ## Oracles - Contract: [0x2f1C5E86B13a74f5A6E7B4b35DD77fe29Aa47514](https://etherscan.io/address/0x2f1C5E86B13a74f5A6E7B4b35DD77fe29Aa47514) @@ -40,6 +50,37 @@ - Implementation: [0x749dCCE12E8337dfb44635082519E656d44A2672](https://etherscan.io/address/0x749dCCE12E8337dfb44635082519E656d44A2672) - Transaction: [0xf7667e029d07c1ee47a46235bb1e90082142d982a10fa94d95fa919594f07c2f](https://etherscan.io/tx/0xf7667e029d07c1ee47a46235bb1e90082142d982a10fa94d95fa919594f07c2f) +## Vesting Escrow + +- Contract: [0xaE678D2A911400a55e06f4A1F0C0B363F3eE2e42](https://etherscan.io/address/0xaE678D2A911400a55e06f4A1F0C0B363F3eE2e42) +- Transaction: [0xa315c073a738f7794a2642dfa0b4db6ced117044df52d2a8ed2c48d33e144599](https://etherscan.io/tx/0xa315c073a738f7794a2642dfa0b4db6ced117044df52d2a8ed2c48d33e144599) + +### Upgrade to v1.2.0 + +- Implementation: [0x1E6d872CE26C8711e7D47b8E0C47aB91d95a6dF3](https://etherscan.io/address/0x1E6d872CE26C8711e7D47b8E0C47aB91d95a6dF3) +- Transaction: [0x0a02dba7fcf0865cbe5fe6ea79682a7c1b164b1c1f28260406d363dc2420e44c](https://etherscan.io/tx/0x0a02dba7fcf0865cbe5fe6ea79682a7c1b164b1c1f28260406d363dc2420e44c) + +## Vesting Escrow Factory + +- Contract: [0x7B910cc3D4B42FEFF056218bD56d7700E4ea7dD5](https://etherscan.io/address/0x7B910cc3D4B42FEFF056218bD56d7700E4ea7dD5) +- Transaction: [0x0dfc545843dc9b5853a5b727e9a8e955f8d193bb2f6415591bdd3e2c245449f5](https://etherscan.io/tx/0x0dfc545843dc9b5853a5b727e9a8e955f8d193bb2f6415591bdd3e2c245449f5) + +### Upgrade to v1.2.0 + +- Implementation: [0xbeE3Eb97Cfd94ace6B66E606B8088C57c5f78fBf](https://etherscan.io/address/0xbeE3Eb97Cfd94ace6B66E606B8088C57c5f78fBf) +- Transaction: [0xd5427b4f7c399cece60601812e6513d064e64f51b6cd21597996a895ba5ea798](https://etherscan.io/tx/0xd5427b4f7c399cece60601812e6513d064e64f51b6cd21597996a895ba5ea798) + +## Dao Module + +- Repository: [DAO Module](https://github.com/gnosis/dao-module/tree/a04437988d26d49b6308bf49d229e275a10802ee) +- Contract: [0x1df2Ce448b082272dAc9B6842A54f342cF4e614e](https://etherscan.io/address/0x1df2Ce448b082272dAc9B6842A54f342cF4e614e) +- Transaction: [0x70e01404548e1a91249f9009e82d938de783480fc1f708c28830e7f14102b201](https://etherscan.io/tx/0x70e01404548e1a91249f9009e82d938de783480fc1f708c28830e7f14102b201) + +## Early Adopters Campaign (Merkle Drop) + +- Contract: [0x2AAB6822a1a9f982fd7b0Fe35A5A5b6148eCf4d5](https://etherscan.io/address/0x2AAB6822a1a9f982fd7b0Fe35A5A5b6148eCf4d5) +- Transaction: [0x4912a5f2c61be471dc5200ae7a4d08cdb61d32e13d3071e226807346ac9a1c87](https://etherscan.io/tx/0x4912a5f2c61be471dc5200ae7a4d08cdb61d32e13d3071e226807346ac9a1c87) + ## Proxy Admin - Contract: [0x3EB0175dcD67d3AB139aA03165e24AA2188A4C22](https://etherscan.io/address/0x3EB0175dcD67d3AB139aA03165e24AA2188A4C22) diff --git a/test/Proxies.test.js b/test/Proxies.test.js index b5dab362..3a7f44db 100644 --- a/test/Proxies.test.js +++ b/test/Proxies.test.js @@ -15,6 +15,8 @@ let implementations = [ '0x6A8a1716a44f700af56ea52D44B916A50333A369', '0x46B7232bc7392b157371eBFcD4618Ca9CEedb1bd', '0x749dCCE12E8337dfb44635082519E656d44A2672', + '0x48C3399719B582dD63eB5AADf12A40B4C3f52FA2', + '0x7B910cc3D4B42FEFF056218bD56d7700E4ea7dD5', ]; contract('Proxies', () => { diff --git a/test/oracles/Oracles.test.js b/test/oracles/Oracles.test.js index 5a0d9333..98cd9119 100644 --- a/test/oracles/Oracles.test.js +++ b/test/oracles/Oracles.test.js @@ -140,15 +140,19 @@ contract('Oracles', ([_, ...accounts]) => { }); describe('oracles voting', () => { - let oracleAccounts = []; let prevTotalRewards, newTotalRewards, currentNonce, pendingValidators, - activatedValidators; + activatedValidators, + oracleAccounts; beforeEach(async () => { oracleAccounts = await getOracleAccounts({ oracles }); + for (const oracleAccount of oracleAccounts) { + await send.ether(anyone, oracleAccount, ether('2')); + } + prevTotalRewards = await rewardEthToken.totalRewards(); newTotalRewards = prevTotalRewards.add(ether('10')); currentNonce = await oracles.currentNonce(); diff --git a/test/pool/settings.test.js b/test/pool/settings.test.js index 35373a2b..41f51206 100644 --- a/test/pool/settings.test.js +++ b/test/pool/settings.test.js @@ -13,14 +13,19 @@ const { setActivatedValidators, getOracleAccounts, } = require('../utils'); +const { validatorParams } = require('./validatorParams'); const { upgradeContracts } = require('../../deployments'); const { contractSettings, contracts } = require('../../deployments/settings'); const Pool = artifacts.require('Pool'); const Oracles = artifacts.require('Oracles'); +const Validators = artifacts.require('Validators'); const RewardEthToken = artifacts.require('RewardEthToken'); -contract('Pool (settings)', ([anyone]) => { +const withdrawalCredentials = + '0x0072ea0cf49536e3c66c787f705186df9a4378083753ae9536d65b3ad7fcddc4'; + +contract('Pool (settings)', ([operator, anyone]) => { const admin = contractSettings.admin; let pool, oracles, oracleAccounts, rewardEthToken; @@ -32,6 +37,9 @@ contract('Pool (settings)', ([anyone]) => { await upgradeContracts(); pool = await Pool.at(contracts.pool); + let validators = await Validators.at(contracts.validators); + await validators.addOperator(operator, { from: admin }); + oracles = await Oracles.at(contracts.oracles); oracleAccounts = await getOracleAccounts({ oracles }); rewardEthToken = await RewardEthToken.at(contracts.rewardEthToken); @@ -127,9 +135,20 @@ contract('Pool (settings)', ([anyone]) => { }); it('oracles contract can set activated validators', async () => { - let activatedValidators = new BN( - contractSettings.activatedValidators - ).add(new BN(contractSettings.pendingValidators)); + await pool.setWithdrawalCredentials(withdrawalCredentials, { + from: admin, + }); + await pool.addDeposit({ + from: anyone, + value: ether('32'), + }); + await pool.registerValidator(validatorParams[0], { + from: operator, + }); + + let activatedValidators = new BN(contractSettings.activatedValidators) + .add(new BN(contractSettings.pendingValidators)) + .add(new BN(1)); let receipt = await setActivatedValidators({ pool, rewardEthToken, diff --git a/test/vestings/VestingEscrow.test.js b/test/vestings/VestingEscrow.test.js index fe145d8d..ab62b774 100644 --- a/test/vestings/VestingEscrow.test.js +++ b/test/vestings/VestingEscrow.test.js @@ -46,6 +46,7 @@ contract('VestingEscrow', ([recipient, beneficiary, anyone]) => { let receipt = await vestingEscrowFactory.deployEscrow( stakeWiseToken.address, recipient, + beneficiary, totalAmount, startTime, vestingDuration, @@ -66,6 +67,7 @@ contract('VestingEscrow', ([recipient, beneficiary, anyone]) => { ).to.bignumber.equal(new BN(1)); expect(await escrow.token()).to.equal(stakeWiseToken.address); expect(await escrow.recipient()).to.equal(recipient); + expect(await escrow.beneficiary()).to.equal(beneficiary); expect(await escrow.totalAmount()).to.bignumber.equal(totalAmount); expect(await escrow.claimedAmount()).to.bignumber.equal(new BN(0)); expect(await escrow.startTime()).to.bignumber.equal(startTime); @@ -124,42 +126,42 @@ contract('VestingEscrow', ([recipient, beneficiary, anyone]) => { it('admin can stop vesting escrow when some amount was already claimed', async () => { await time.increase(cliffLength); let vestedAmount = await escrow.vestedAmount(); - await escrow.claim(recipient, vestedAmount, { + await escrow.claim(vestedAmount, { from: recipient, }); - expect(await stakeWiseToken.balanceOf(recipient)).to.bignumber.equal( + expect(await stakeWiseToken.balanceOf(beneficiary)).to.bignumber.equal( vestedAmount ); - let receipt = await escrow.stop(beneficiary, { + let receipt = await escrow.stop(anyone, { from: admin, }); expectEvent(receipt, 'Stopped', { sender: admin, - beneficiary, + beneficiary: anyone, amount: totalAmount.sub(vestedAmount), }); - expect(await stakeWiseToken.balanceOf(beneficiary)).to.bignumber.equal( + expect(await stakeWiseToken.balanceOf(anyone)).to.bignumber.equal( totalAmount.sub(vestedAmount) ); }); it('fails to stop vesting escrow when full amount was already claimed', async () => { await time.increaseTo(endTime); - await escrow.claim(recipient, totalAmount, { + await escrow.claim(totalAmount, { from: recipient, }); - expect(await stakeWiseToken.balanceOf(recipient)).to.bignumber.equal( + expect(await stakeWiseToken.balanceOf(beneficiary)).to.bignumber.equal( totalAmount ); await expectRevert( - escrow.stop(beneficiary, { + escrow.stop(anyone, { from: admin, }), 'VestingEscrow: nothing to pull' ); - expect(await stakeWiseToken.balanceOf(beneficiary)).to.bignumber.equal( + expect(await stakeWiseToken.balanceOf(anyone)).to.bignumber.equal( new BN(0) ); }); @@ -191,7 +193,7 @@ contract('VestingEscrow', ([recipient, beneficiary, anyone]) => { }); it('recipient can claim unlocked tokens', async () => { - let receipt = await escrow.claim(beneficiary, vestedAmount, { + let receipt = await escrow.claim(vestedAmount, { from: recipient, }); expectEvent(receipt, 'Claimed', { @@ -210,26 +212,17 @@ contract('VestingEscrow', ([recipient, beneficiary, anyone]) => { it('fails to claim unlocked tokens from not recipient address', async () => { await expectRevert( - escrow.claim(beneficiary, vestedAmount, { + escrow.claim(vestedAmount, { from: admin, }), 'VestingEscrow: access denied' ); }); - it('fails to claim unlocked tokens with invalid beneficiary address', async () => { - await expectRevert( - escrow.claim(constants.ZERO_ADDRESS, vestedAmount, { - from: recipient, - }), - 'PoolEscrow: beneficiary is the zero address' - ); - }); - it('fails to claim unlocked tokens when paused', async () => { await escrow.pause({ from: admin }); await expectRevert( - escrow.claim(beneficiary, vestedAmount, { + escrow.claim(vestedAmount, { from: recipient, }), 'Pausable: paused' @@ -238,7 +231,7 @@ contract('VestingEscrow', ([recipient, beneficiary, anyone]) => { it('fails to claim with zero amount', async () => { await expectRevert( - escrow.claim(beneficiary, new BN(0), { + escrow.claim(new BN(0), { from: recipient, }), 'VestingEscrow: amount is zero' @@ -247,7 +240,7 @@ contract('VestingEscrow', ([recipient, beneficiary, anyone]) => { it('fails to claim with invalid amount', async () => { await expectRevert( - escrow.claim(beneficiary, vestedAmount.mul(new BN(2)), { + escrow.claim(vestedAmount.mul(new BN(2)), { from: recipient, }), 'VestingEscrow: invalid amount' @@ -257,7 +250,7 @@ contract('VestingEscrow', ([recipient, beneficiary, anyone]) => { it('fails to claim multiple times', async () => { await time.increaseTo(endTime); - let receipt = await escrow.claim(beneficiary, totalAmount, { + let receipt = await escrow.claim(totalAmount, { from: recipient, }); expectEvent(receipt, 'Claimed', { @@ -274,7 +267,7 @@ contract('VestingEscrow', ([recipient, beneficiary, anyone]) => { ); await expectRevert( - escrow.claim(beneficiary, vestedAmount, { + escrow.claim(vestedAmount, { from: recipient, }), 'VestingEscrow: invalid amount' diff --git a/test/vestings/VestingEscrowFactory.test.js b/test/vestings/VestingEscrowFactory.test.js index 24fb0780..71a08653 100644 --- a/test/vestings/VestingEscrowFactory.test.js +++ b/test/vestings/VestingEscrowFactory.test.js @@ -19,7 +19,7 @@ const { const VestingEscrowFactory = artifacts.require('VestingEscrowFactory'); const StakeWiseToken = artifacts.require('StakeWiseToken'); -contract('VestingEscrowFactory', ([recipient, anyone]) => { +contract('VestingEscrowFactory', ([recipient, beneficiary, anyone]) => { const admin = contractSettings.admin; const vestedAmount = ether('10000'); @@ -46,6 +46,7 @@ contract('VestingEscrowFactory', ([recipient, anyone]) => { vestingEscrowFactory.deployEscrow( stakeWiseToken.address, recipient, + beneficiary, vestedAmount, 0, time.duration.years(4), @@ -63,6 +64,7 @@ contract('VestingEscrowFactory', ([recipient, anyone]) => { vestingEscrowFactory.deployEscrow( stakeWiseToken.address, recipient, + beneficiary, vestedAmount, 0, time.duration.years(4), @@ -80,6 +82,7 @@ contract('VestingEscrowFactory', ([recipient, anyone]) => { vestingEscrowFactory.deployEscrow( stakeWiseToken.address, recipient, + beneficiary, vestedAmount, 0, time.duration.years(4), @@ -97,6 +100,7 @@ contract('VestingEscrowFactory', ([recipient, anyone]) => { vestingEscrowFactory.deployEscrow( stakeWiseToken.address, recipient, + beneficiary, vestedAmount, 0, time.duration.years(4), @@ -114,6 +118,7 @@ contract('VestingEscrowFactory', ([recipient, anyone]) => { vestingEscrowFactory.deployEscrow( stakeWiseToken.address, constants.ZERO_ADDRESS, + beneficiary, vestedAmount, 0, time.duration.years(4), @@ -126,11 +131,30 @@ contract('VestingEscrowFactory', ([recipient, anyone]) => { ); }); + it('fails to deploy escrow with invalid beneficiary', async () => { + await expectRevert( + vestingEscrowFactory.deployEscrow( + stakeWiseToken.address, + recipient, + constants.ZERO_ADDRESS, + vestedAmount, + 0, + time.duration.years(4), + time.duration.days(180), + { + from: admin, + } + ), + 'PoolEscrow: beneficiary is the zero address' + ); + }); + it('fails to deploy escrow with invalid token', async () => { await expectRevert( vestingEscrowFactory.deployEscrow( constants.ZERO_ADDRESS, recipient, + beneficiary, vestedAmount, 0, time.duration.years(4), @@ -151,6 +175,7 @@ contract('VestingEscrowFactory', ([recipient, anyone]) => { let receipt = await vestingEscrowFactory.deployEscrow( stakeWiseToken.address, recipient, + beneficiary, vestedAmount, startTime, time.duration.years(4), @@ -166,6 +191,7 @@ contract('VestingEscrowFactory', ([recipient, anyone]) => { admin, token: stakeWiseToken.address, recipient, + beneficiary, totalAmount: vestedAmount, startTime, endTime: startTime.add(time.duration.years(4)), @@ -182,6 +208,7 @@ contract('VestingEscrowFactory', ([recipient, anyone]) => { let receipt = await vestingEscrowFactory.deployEscrow( stakeWiseToken.address, recipient, + beneficiary, vestedAmount, startTime, time.duration.years(4), @@ -197,6 +224,7 @@ contract('VestingEscrowFactory', ([recipient, anyone]) => { admin, token: stakeWiseToken.address, recipient, + beneficiary, totalAmount: vestedAmount, startTime, endTime: startTime.add(time.duration.years(4)), @@ -210,6 +238,7 @@ contract('VestingEscrowFactory', ([recipient, anyone]) => { receipt = await vestingEscrowFactory.deployEscrow( stakeWiseToken.address, recipient, + beneficiary, vestedAmount, startTime, time.duration.years(4), @@ -225,6 +254,7 @@ contract('VestingEscrowFactory', ([recipient, anyone]) => { admin, token: stakeWiseToken.address, recipient, + beneficiary, totalAmount: vestedAmount, startTime, endTime: startTime.add(time.duration.years(4)), diff --git a/test/vestings/upgrading.test.js b/test/vestings/upgrading.test.js new file mode 100644 index 00000000..5d79d117 --- /dev/null +++ b/test/vestings/upgrading.test.js @@ -0,0 +1,53 @@ +const { expectRevert, send, ether } = require('@openzeppelin/test-helpers'); +const { + stopImpersonatingAccount, + impersonateAccount, + resetFork, +} = require('../utils'); +const { contractSettings } = require('../../deployments/settings'); +const { upgradeContracts } = require('../../deployments'); + +const VestingEscrowFactory = artifacts.require('VestingEscrowFactory'); + +contract('VestingEscrowFactory (upgrading)', ([vestingEscrow, anyone]) => { + const admin = contractSettings.admin; + let vestingEscrowFactory; + + after(async () => stopImpersonatingAccount(admin)); + + beforeEach(async () => { + await impersonateAccount(admin); + await send.ether(anyone, admin, ether('5')); + + let contracts = await upgradeContracts(); + vestingEscrowFactory = await VestingEscrowFactory.at( + contracts.vestingEscrowFactory + ); + }); + + afterEach(async () => resetFork()); + + it('fails to upgrade with not admin privilege', async () => { + await expectRevert( + vestingEscrowFactory.upgrade(vestingEscrow, { from: anyone }), + 'OwnablePausable: access denied' + ); + }); + + it('fails to upgrade when not paused', async () => { + await expectRevert( + vestingEscrowFactory.upgrade(vestingEscrow, { from: admin }), + 'Pausable: not paused' + ); + }); + + it('fails to upgrade twice', async () => { + await vestingEscrowFactory.pause({ from: admin }); + await expectRevert( + vestingEscrowFactory.upgrade(contractSettings.vestingEscrow, { + from: admin, + }), + 'VestingEscrowFactory: already upgraded' + ); + }); +});