From b60d1d46432748c52e1b568436de66336ce3e34a Mon Sep 17 00:00:00 2001 From: adu Date: Fri, 2 Aug 2024 18:14:30 +0800 Subject: [PATCH 1/5] fix: incompatible storage layout for Bootstrap and ClientChainGateway --- docs/bootstrap_storage.txt | 36 ++++++++++++++++++++++ docs/clientchaingateway_storage.txt | 41 ++++++++++++++++++++++++++ src/core/BaseRestakingController.sol | 3 ++ src/core/LSTRestakingController.sol | 2 ++ src/core/NativeRestakingController.sol | 3 ++ 5 files changed, 85 insertions(+) create mode 100644 docs/bootstrap_storage.txt create mode 100644 docs/clientchaingateway_storage.txt 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 From 7361e7e9055b1c71d7cf945e184971c39a1e2f31 Mon Sep 17 00:00:00 2001 From: MaxMustermann2 <82761650+MaxMustermann2@users.noreply.github.com> Date: Fri, 2 Aug 2024 12:48:55 +0000 Subject: [PATCH 2/5] feat: ci for storage --- .github/workflows/compare_storage_layout.py | 68 ++++++++++++++++++++ .github/workflows/forge-ci.yml | 69 +++++++++++++++++---- 2 files changed, 126 insertions(+), 11 deletions(-) create mode 100755 .github/workflows/compare_storage_layout.py diff --git a/.github/workflows/compare_storage_layout.py b/.github/workflows/compare_storage_layout.py new file mode 100755 index 00000000..d628822e --- /dev/null +++ b/.github/workflows/compare_storage_layout.py @@ -0,0 +1,68 @@ +#!/usr/bin/env python + +import pandas as pd +import os + +def parse_layout(file_path): + expected_headers = ['Unnamed: 0', 'Name', 'Type', 'Slot', 'Offset', 'Bytes', 'Contract', 'Unnamed: 7'] + + if not os.path.isfile(file_path): + raise FileNotFoundError(f"Error: File {file_path} does not exist.") + + # Read the file using pandas, with '|' as the delimiter + df = pd.read_csv(file_path, delimiter='|', engine='python', header=0) + + # Trim leading/trailing whitespace from all columns + df.columns = [col.strip() for col in df.columns] + df = df.apply(lambda x: x.strip() if isinstance(x, str) else x) + + # Check headers + if not all([df.columns[i] == expected_headers[i] for i in range(len(expected_headers))]): + raise ValueError(f"Error: Headers in {file_path} do not match expected headers.") + + # Drop the second row (assuming it's a separator row) + df = df.drop(df.index[1]) + + # Combine relevant columns into a single string for comparison + df['Combined'] = df[['Name', 'Type', 'Slot', 'Offset', 'Bytes']].apply(lambda row: '|'.join(row.values), axis=1) + + return df['Combined'].tolist() + +def compare_layouts(clientChainGateway_entries, bootstrap_entries): + mismatches = [] + length = len(bootstrap_entries) + + if length > len(clientChainGateway_entries): + mismatches.append("Error: Bootstrap entries are more than ClientChainGateway entries.") + return mismatches + + for i in range(length): + if bootstrap_entries[i] != clientChainGateway_entries[i]: + mismatches.append(f"Mismatch at position {i + 1}: {bootstrap_entries[i]} != {clientChainGateway_entries[i]}") + + return mismatches + +if __name__ == "__main__": + try: + clientChainGateway_entries = parse_layout("ClientChainGateway.md") + bootstrap_entries = parse_layout("Bootstrap.md") + + if not clientChainGateway_entries: + raise ValueError("Error: No valid entries found in ClientChainGateway.md.") + + if not bootstrap_entries: + raise ValueError("Error: No valid entries found in Bootstrap.md.") + + mismatches = compare_layouts(clientChainGateway_entries, bootstrap_entries) + + if mismatches: + print(f"Mismatches found: {len(mismatches)}") + for mismatch in mismatches: + print(mismatch) + exit(1) + else: + print("All entries in Bootstrap are present in ClientChainGateway at the correct positions.") + except Exception as e: + print(e) + exit(1) + diff --git a/.github/workflows/forge-ci.yml b/.github/workflows/forge-ci.yml index 0a4c8278..9192717f 100644 --- a/.github/workflows/forge-ci.yml +++ b/.github/workflows/forge-ci.yml @@ -1,5 +1,4 @@ ---- -name: Forge CI to build, test and format +name: Forge CI to build, test, format and compare storage layout on: merge_group: @@ -24,7 +23,8 @@ jobs: installation-dir: ${{ needs.setup.outputs.installation-dir }} cache-key: ${{ needs.setup.outputs.cache-key }} steps: - - uses: actions/checkout@v4 + - name: Checkout repository + uses: actions/checkout@v4 with: submodules: recursive - name: Restore cached Foundry toolchain @@ -62,7 +62,8 @@ jobs: runs-on: ubuntu-latest needs: build steps: - - uses: actions/checkout@v4 + - name: Checkout repository + uses: actions/checkout@v4 - name: Restore cached Foundry toolchain uses: actions/cache/restore@v3 with: @@ -79,10 +80,8 @@ jobs: ./cache ./broadcast key: ${{ runner.os }}-build-${{ github.sha }} - - name: Run tests - run: forge test -vvv - - name: Run test snapshot - run: NO_COLOR=1 forge snapshot >> $GITHUB_STEP_SUMMARY + - name: Test + run: forge test - name: Add comment for test failure if: failure() uses: actions/github-script@v6 @@ -96,11 +95,12 @@ jobs: body: 'The tests have failed. Please check the logs.' }) - fmt: + format: runs-on: ubuntu-latest needs: build steps: - - uses: actions/checkout@v4 + - name: Checkout repository + uses: actions/checkout@v4 - name: Restore cached Foundry toolchain uses: actions/cache/restore@v3 with: @@ -119,7 +119,7 @@ jobs: key: ${{ runner.os }}-build-${{ github.sha }} - name: Check formatting run: forge fmt --check - - name: Add comment for format failure + - name: Add comment for format check failure if: failure() uses: actions/github-script@v6 with: @@ -131,3 +131,50 @@ jobs: repo: context.repo.repo, body: 'The code is not formatted correctly. Please run `forge fmt` and push the changes.' }) + + compare-storage-layout: + runs-on: ubuntu-latest + needs: build + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Restore cached Foundry toolchain + uses: actions/cache/restore@v3 + with: + path: ${{ needs.build.outputs.installation-dir }} + key: ${{ needs.build.outputs.cache-key }} + - name: Add Foundry to PATH + run: echo "${{ needs.build.outputs.installation-dir }}" >> $GITHUB_PATH + - name: Restore build artifacts + uses: actions/cache/restore@v3 + with: + path: | + ./lib + ./out + ./cache + ./broadcast + key: ${{ runner.os }}-build-${{ github.sha }} + - name: Run forge inspect storage layout on ClientChainGateway + run: forge inspect --pretty src/core/ClientChainGateway.sol:ClientChainGateway storageLayout > ClientChainGateway.md + - name: Run forge inspect storage layout on Bootstrap + run: forge inspect --pretty src/core/Bootstrap.sol:Bootstrap storageLayout > Bootstrap.md + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.12.4' + - name: Install pandas + run: pip install --root-user-action=ignore pandas==2.2.2 + - name: Run the comparison script + run: python .github/workflows/compare_storage_layout.py + - name: Add comment for storage layout mismatch failure + if: failure() + uses: actions/github-script@v6 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: 'The storage layout of Bootstrap and ClientChainGateway is not the same. Please check the logs.' + }) From 859595ba2783e1a46f1b9c8eb60be91efb5cc0db Mon Sep 17 00:00:00 2001 From: MaxMustermann2 <82761650+MaxMustermann2@users.noreply.github.com> Date: Fri, 2 Aug 2024 12:53:37 +0000 Subject: [PATCH 3/5] fix(typo): rename the step for grammar --- .github/workflows/foundry-setup.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/foundry-setup.yml b/.github/workflows/foundry-setup.yml index dfd5688c..d4367318 100644 --- a/.github/workflows/foundry-setup.yml +++ b/.github/workflows/foundry-setup.yml @@ -36,7 +36,7 @@ jobs: installation_path=$(which forge) installation_dir=$(dirname $installation_path) echo "installation-dir=$installation_dir" >> "$GITHUB_OUTPUT" - - name: Cached Foundry toolchain + - name: Cache the Foundry toolchain uses: actions/cache/save@v3 with: path: ${{ steps.find-path.outputs.installation-dir }} From a274c20dcdd84fb4748268487907ca09d3df339a Mon Sep 17 00:00:00 2001 From: MaxMustermann2 <82761650+MaxMustermann2@users.noreply.github.com> Date: Sat, 3 Aug 2024 06:43:44 +0000 Subject: [PATCH 4/5] fix(ci): add back the snapshot --- .github/workflows/forge-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/forge-ci.yml b/.github/workflows/forge-ci.yml index 9192717f..7eed6b15 100644 --- a/.github/workflows/forge-ci.yml +++ b/.github/workflows/forge-ci.yml @@ -81,7 +81,9 @@ jobs: ./broadcast key: ${{ runner.os }}-build-${{ github.sha }} - name: Test - run: forge test + run: forge test -vvv + - name: Set test snapshot as summary + run: NO_COLOR=1 forge snapshot >> $GITHUB_STEP_SUMMARY - name: Add comment for test failure if: failure() uses: actions/github-script@v6 From 531160e0b6b7e1dcb8cf9fc3ad7716a0ac8c600f Mon Sep 17 00:00:00 2001 From: adu Date: Mon, 5 Aug 2024 08:54:28 +0800 Subject: [PATCH 5/5] docs: remove storage layout files --- docs/bootstrap_storage.txt | 36 ------------------------- docs/clientchaingateway_storage.txt | 41 ----------------------------- 2 files changed, 77 deletions(-) delete mode 100644 docs/bootstrap_storage.txt delete mode 100644 docs/clientchaingateway_storage.txt diff --git a/docs/bootstrap_storage.txt b/docs/bootstrap_storage.txt deleted file mode 100644 index 1601d5d3..00000000 --- a/docs/bootstrap_storage.txt +++ /dev/null @@ -1,36 +0,0 @@ -| 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 deleted file mode 100644 index 50c512ce..00000000 --- a/docs/clientchaingateway_storage.txt +++ /dev/null @@ -1,41 +0,0 @@ -| 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 |