From a6e78a2ead1c1cd5dddb29337983b97862e90aae Mon Sep 17 00:00:00 2001 From: Thong Dang Date: Tue, 24 Dec 2024 16:51:17 +0700 Subject: [PATCH] feat: make Vault extends AccessControlEnumerable --- .openzeppelin/base-sepolia.json | 113 ++++++++++++++++++++++++++++++++ contracts/utils/Vault.sol | 5 +- 2 files changed, 116 insertions(+), 2 deletions(-) diff --git a/.openzeppelin/base-sepolia.json b/.openzeppelin/base-sepolia.json index deb9668..9e94b23 100644 --- a/.openzeppelin/base-sepolia.json +++ b/.openzeppelin/base-sepolia.json @@ -1406,6 +1406,119 @@ }, "namespaces": {} } + }, + "623252fcf03ff024e58af93e4dfd8abaae18dea8643c8f80b73f5971dcc0f733": { + "address": "0xB3F7DD672D5d07379C63AC953F559bF87255EA35", + "txHash": "0x47e45c4ce4377d48638e485e35c1b527b63d01a2c85784cf68e216d8669ba66a", + "layout": { + "solcVersion": "0.8.4", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:40" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "configRegistry", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "LemonadeStakePayment", + "src": "contracts/payment/stake/LemonadeStakePayment.sol:17" + }, + { + "label": "stakings", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_bytes32,t_address)", + "contract": "LemonadeStakePayment", + "src": "contracts/payment/stake/LemonadeStakePayment.sol:18" + }, + { + "label": "__gap", + "offset": 0, + "slot": "103", + "type": "t_array(t_uint256)5_storage", + "contract": "LemonadeStakePayment", + "src": "contracts/payment/stake/LemonadeStakePayment.sol:19" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_array(t_uint256)5_storage": { + "label": "uint256[5]", + "numberOfBytes": "160" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_address)": { + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } } } } diff --git a/contracts/utils/Vault.sol b/contracts/utils/Vault.sol index 36edfcc..44ab8a4 100644 --- a/contracts/utils/Vault.sol +++ b/contracts/utils/Vault.sol @@ -3,10 +3,11 @@ pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; -import "@openzeppelin/contracts/access/AccessControl.sol"; +import "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; + import "./Transferable.sol"; -abstract contract Vault is AccessControl, Transferable { +abstract contract Vault is AccessControlEnumerable, Transferable { function withdraw( address destination, address currency,