Skip to content

Conversation

@0xClandestine
Copy link
Member

@0xClandestine 0xClandestine commented Jan 28, 2025

Usage:

> bash bin/storage-diff.sh --help                                                                                                                                                                    
Usage: bash bin/storage-diff.sh --rpc-url https://eth.llamarpc.com --etherscan-key 1234567890123456789012345678901234567890 --input contracts.json [--quiet] [--help]

Detects storage layout incompatibilities that could cause issues during upgrades.

Required:
    -r, --rpc-url <url>         RPC endpoint URL for the target network (default: https://eth.llamarpc.com).
    -e, --etherscan-key <key>   API key for Etherscan to fetch contract data.

Options:
    -i, --input <file>          JSON file containing contract details, see format below (default: contracts.json).
                                If not provided, reads from stdin.
    -q, --quiet                 Suppress informational output.
    -h, --help                  Show this help message.


Input JSON format:
{
  "contracts": [
    {
      "name": "AVSDirectory",
      "address": "0x135dda560e946695d6f155dacafc6f1f25c1f5af"
    },
    {
      "name": "DelegationManager",
      "address": "0x39053D51B77DC0d36036Fc1fCc8Cb819df8Ef37A"
    }
  ]
}

Example input JSON

{
  "contracts": [
    {
      "name": "AVSDirectory",
      "address": "0x135dda560e946695d6f155dacafc6f1f25c1f5af"
    },
    {
      "name": "DelegationManager",
      "address": "0x39053D51B77DC0d36036Fc1fCc8Cb819df8Ef37A"
    },
    {
      "name": "RewardsCoordinator",
      "address": "0x7750d328b314EfFa365A0402CcfD489B80B0adda"
    },
    {
      "name": "StrategyManager",
      "address": "0x858646372CC42E1A627fcE94aa7A7033e7CF075A"
    },
    {
      "name": "StrategyFactory",
      "address": "0x5e4C39Ad7A3E881585e383dB9827EB4811f6F647"
    },
    {
      "name": "EigenPodManager",
      "address": "0x91E677b07F7AF907ec9a428aafA9fc14a0d3A338"
    }
  ]
}

@0xClandestine 0xClandestine merged commit 499fd45 into dev Jan 29, 2025
14 of 18 checks passed
@0xClandestine 0xClandestine deleted the feat/storage-diff-sh branch January 29, 2025 23:32
ypatil12 pushed a commit that referenced this pull request Feb 19, 2025
* feat: storage-diff.sh

* refactor: storage-diff.sh

* refactor: storage-diff.sh

* refactor: storage-diff.sh

* refactor: storage-diff.sh

* refactor: storage-diff.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants