diff --git a/docs/bootstrap_storage.txt b/docs/bootstrap_storage.txt new file mode 100644 index 00000000..1601d5d3 --- /dev/null +++ b/docs/bootstrap_storage.txt @@ -0,0 +1,36 @@ +| Name | Type | Slot | Offset | Bytes | Contract | +|-------------------------------|--------------------------------------------------------------------|------|--------|-------|----------------------------------| +| _initialized | uint8 | 0 | 0 | 1 | src/core/Bootstrap.sol:Bootstrap | +| _initializing | bool | 0 | 1 | 1 | src/core/Bootstrap.sol:Bootstrap | +| __gap | uint256[50] | 1 | 0 | 1600 | src/core/Bootstrap.sol:Bootstrap | +| _paused | bool | 51 | 0 | 1 | src/core/Bootstrap.sol:Bootstrap | +| __gap | uint256[49] | 52 | 0 | 1568 | src/core/Bootstrap.sol:Bootstrap | +| _owner | address | 101 | 0 | 20 | src/core/Bootstrap.sol:Bootstrap | +| __gap | uint256[49] | 102 | 0 | 1568 | src/core/Bootstrap.sol:Bootstrap | +| _status | uint256 | 151 | 0 | 32 | src/core/Bootstrap.sol:Bootstrap | +| __gap | uint256[49] | 152 | 0 | 1568 | src/core/Bootstrap.sol:Bootstrap | +| peers | mapping(uint32 => bytes32) | 201 | 0 | 32 | src/core/Bootstrap.sol:Bootstrap | +| _whiteListFunctionSelectors | mapping(enum GatewayStorage.Action => bytes4) | 202 | 0 | 32 | src/core/Bootstrap.sol:Bootstrap | +| inboundNonce | mapping(uint32 => mapping(bytes32 => uint64)) | 203 | 0 | 32 | src/core/Bootstrap.sol:Bootstrap | +| __gap | uint256[40] | 204 | 0 | 1280 | src/core/Bootstrap.sol:Bootstrap | +| exocoreSpawnTime | uint256 | 244 | 0 | 32 | src/core/Bootstrap.sol:Bootstrap | +| offsetDuration | uint256 | 245 | 0 | 32 | src/core/Bootstrap.sol:Bootstrap | +| depositsByToken | mapping(address => uint256) | 246 | 0 | 32 | src/core/Bootstrap.sol:Bootstrap | +| registeredValidators | address[] | 247 | 0 | 32 | src/core/Bootstrap.sol:Bootstrap | +| ethToExocoreAddress | mapping(address => string) | 248 | 0 | 32 | src/core/Bootstrap.sol:Bootstrap | +| validators | mapping(string => struct IValidatorRegistry.Validator) | 249 | 0 | 32 | src/core/Bootstrap.sol:Bootstrap | +| commissionEdited | mapping(string => bool) | 250 | 0 | 32 | src/core/Bootstrap.sol:Bootstrap | +| delegationsByValidator | mapping(string => mapping(address => uint256)) | 251 | 0 | 32 | src/core/Bootstrap.sol:Bootstrap | +| depositors | address[] | 252 | 0 | 32 | src/core/Bootstrap.sol:Bootstrap | +| isDepositor | mapping(address => bool) | 253 | 0 | 32 | src/core/Bootstrap.sol:Bootstrap | +| totalDepositAmounts | mapping(address => mapping(address => uint256)) | 254 | 0 | 32 | src/core/Bootstrap.sol:Bootstrap | +| withdrawableAmounts | mapping(address => mapping(address => uint256)) | 255 | 0 | 32 | src/core/Bootstrap.sol:Bootstrap | +| delegations | mapping(address => mapping(string => mapping(address => uint256))) | 256 | 0 | 32 | src/core/Bootstrap.sol:Bootstrap | +| bootstrapped | bool | 257 | 0 | 1 | src/core/Bootstrap.sol:Bootstrap | +| customProxyAdmin | address | 257 | 1 | 20 | src/core/Bootstrap.sol:Bootstrap | +| clientChainGatewayLogic | address | 258 | 0 | 20 | src/core/Bootstrap.sol:Bootstrap | +| clientChainInitializationData | bytes | 259 | 0 | 32 | src/core/Bootstrap.sol:Bootstrap | +| whitelistTokens | address[] | 260 | 0 | 32 | src/core/Bootstrap.sol:Bootstrap | +| isWhitelistedToken | mapping(address => bool) | 261 | 0 | 32 | src/core/Bootstrap.sol:Bootstrap | +| tokenToVault | mapping(address => contract IVault) | 262 | 0 | 32 | src/core/Bootstrap.sol:Bootstrap | +| __gap | uint256[40] | 263 | 0 | 1280 | src/core/Bootstrap.sol:Bootstrap | diff --git a/docs/clientchaingateway_storage.txt b/docs/clientchaingateway_storage.txt new file mode 100644 index 00000000..50c512ce --- /dev/null +++ b/docs/clientchaingateway_storage.txt @@ -0,0 +1,41 @@ +| Name | Type | Slot | Offset | Bytes | Contract | +|-------------------------------|--------------------------------------------------------------------|------|--------|-------|----------------------------------------------------| +| _initialized | uint8 | 0 | 0 | 1 | src/core/ClientChainGateway.sol:ClientChainGateway | +| _initializing | bool | 0 | 1 | 1 | src/core/ClientChainGateway.sol:ClientChainGateway | +| __gap | uint256[50] | 1 | 0 | 1600 | src/core/ClientChainGateway.sol:ClientChainGateway | +| _paused | bool | 51 | 0 | 1 | src/core/ClientChainGateway.sol:ClientChainGateway | +| __gap | uint256[49] | 52 | 0 | 1568 | src/core/ClientChainGateway.sol:ClientChainGateway | +| _owner | address | 101 | 0 | 20 | src/core/ClientChainGateway.sol:ClientChainGateway | +| __gap | uint256[49] | 102 | 0 | 1568 | src/core/ClientChainGateway.sol:ClientChainGateway | +| _status | uint256 | 151 | 0 | 32 | src/core/ClientChainGateway.sol:ClientChainGateway | +| __gap | uint256[49] | 152 | 0 | 1568 | src/core/ClientChainGateway.sol:ClientChainGateway | +| peers | mapping(uint32 => bytes32) | 201 | 0 | 32 | src/core/ClientChainGateway.sol:ClientChainGateway | +| _whiteListFunctionSelectors | mapping(enum GatewayStorage.Action => bytes4) | 202 | 0 | 32 | src/core/ClientChainGateway.sol:ClientChainGateway | +| inboundNonce | mapping(uint32 => mapping(bytes32 => uint64)) | 203 | 0 | 32 | src/core/ClientChainGateway.sol:ClientChainGateway | +| __gap | uint256[40] | 204 | 0 | 1280 | src/core/ClientChainGateway.sol:ClientChainGateway | +| exocoreSpawnTime | uint256 | 244 | 0 | 32 | src/core/ClientChainGateway.sol:ClientChainGateway | +| offsetDuration | uint256 | 245 | 0 | 32 | src/core/ClientChainGateway.sol:ClientChainGateway | +| depositsByToken | mapping(address => uint256) | 246 | 0 | 32 | src/core/ClientChainGateway.sol:ClientChainGateway | +| registeredValidators | address[] | 247 | 0 | 32 | src/core/ClientChainGateway.sol:ClientChainGateway | +| ethToExocoreAddress | mapping(address => string) | 248 | 0 | 32 | src/core/ClientChainGateway.sol:ClientChainGateway | +| validators | mapping(string => struct IValidatorRegistry.Validator) | 249 | 0 | 32 | src/core/ClientChainGateway.sol:ClientChainGateway | +| commissionEdited | mapping(string => bool) | 250 | 0 | 32 | src/core/ClientChainGateway.sol:ClientChainGateway | +| delegationsByValidator | mapping(string => mapping(address => uint256)) | 251 | 0 | 32 | src/core/ClientChainGateway.sol:ClientChainGateway | +| depositors | address[] | 252 | 0 | 32 | src/core/ClientChainGateway.sol:ClientChainGateway | +| isDepositor | mapping(address => bool) | 253 | 0 | 32 | src/core/ClientChainGateway.sol:ClientChainGateway | +| totalDepositAmounts | mapping(address => mapping(address => uint256)) | 254 | 0 | 32 | src/core/ClientChainGateway.sol:ClientChainGateway | +| withdrawableAmounts | mapping(address => mapping(address => uint256)) | 255 | 0 | 32 | src/core/ClientChainGateway.sol:ClientChainGateway | +| delegations | mapping(address => mapping(string => mapping(address => uint256))) | 256 | 0 | 32 | src/core/ClientChainGateway.sol:ClientChainGateway | +| bootstrapped | bool | 257 | 0 | 1 | src/core/ClientChainGateway.sol:ClientChainGateway | +| customProxyAdmin | address | 257 | 1 | 20 | src/core/ClientChainGateway.sol:ClientChainGateway | +| clientChainGatewayLogic | address | 258 | 0 | 20 | src/core/ClientChainGateway.sol:ClientChainGateway | +| clientChainInitializationData | bytes | 259 | 0 | 32 | src/core/ClientChainGateway.sol:ClientChainGateway | +| whitelistTokens | address[] | 260 | 0 | 32 | src/core/ClientChainGateway.sol:ClientChainGateway | +| isWhitelistedToken | mapping(address => bool) | 261 | 0 | 32 | src/core/ClientChainGateway.sol:ClientChainGateway | +| tokenToVault | mapping(address => contract IVault) | 262 | 0 | 32 | src/core/ClientChainGateway.sol:ClientChainGateway | +| __gap | uint256[40] | 263 | 0 | 1280 | src/core/ClientChainGateway.sol:ClientChainGateway | +| outboundNonce | uint64 | 303 | 0 | 8 | src/core/ClientChainGateway.sol:ClientChainGateway | +| ownerToCapsule | mapping(address => contract IExoCapsule) | 304 | 0 | 32 | src/core/ClientChainGateway.sol:ClientChainGateway | +| _registeredRequests | mapping(uint64 => bytes) | 305 | 0 | 32 | src/core/ClientChainGateway.sol:ClientChainGateway | +| _registeredRequestActions | mapping(uint64 => enum GatewayStorage.Action) | 306 | 0 | 32 | src/core/ClientChainGateway.sol:ClientChainGateway | +| __gap | uint256[40] | 307 | 0 | 1280 | src/core/ClientChainGateway.sol:ClientChainGateway | diff --git a/src/core/BaseRestakingController.sol b/src/core/BaseRestakingController.sol index 96035796..98f125e0 100644 --- a/src/core/BaseRestakingController.sol +++ b/src/core/BaseRestakingController.sol @@ -8,6 +8,8 @@ import {MessagingFee, MessagingReceipt, OAppSenderUpgradeable} from "../lzApp/OA import {ClientChainGatewayStorage} from "../storage/ClientChainGatewayStorage.sol"; import {OptionsBuilder} from "@layerzero-v2/oapp/contracts/oapp/libs/OptionsBuilder.sol"; + +import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import {PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; @@ -18,6 +20,7 @@ import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/se /// Bootstrap. abstract contract BaseRestakingController is PausableUpgradeable, + OwnableUpgradeable, ReentrancyGuardUpgradeable, OAppSenderUpgradeable, IBaseRestakingController, diff --git a/src/core/LSTRestakingController.sol b/src/core/LSTRestakingController.sol index 9987152c..f44107b8 100644 --- a/src/core/LSTRestakingController.sol +++ b/src/core/LSTRestakingController.sol @@ -6,6 +6,7 @@ import {ILSTRestakingController} from "../interfaces/ILSTRestakingController.sol import {IVault} from "../interfaces/IVault.sol"; import {BaseRestakingController} from "./BaseRestakingController.sol"; +import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import {PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; @@ -14,6 +15,7 @@ import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/se /// @notice Implementation of ILSTRestakingController, used to restake tokens. abstract contract LSTRestakingController is PausableUpgradeable, + OwnableUpgradeable, ReentrancyGuardUpgradeable, ILSTRestakingController, BaseRestakingController diff --git a/src/core/NativeRestakingController.sol b/src/core/NativeRestakingController.sol index 33846230..875ce34b 100644 --- a/src/core/NativeRestakingController.sol +++ b/src/core/NativeRestakingController.sol @@ -8,6 +8,8 @@ import {ValidatorContainer} from "../libraries/ValidatorContainer.sol"; import {BaseRestakingController} from "./BaseRestakingController.sol"; import {Errors} from "../libraries/Errors.sol"; + +import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import {PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; import {Create2} from "@openzeppelin/contracts/utils/Create2.sol"; @@ -19,6 +21,7 @@ import {Create2} from "@openzeppelin/contracts/utils/Create2.sol"; /// @dev This contract is abstract because it does not call the base constructor. abstract contract NativeRestakingController is PausableUpgradeable, + OwnableUpgradeable, ReentrancyGuardUpgradeable, INativeRestakingController, BaseRestakingController