axelarnetwork / axelar-gmp-sdk-solidity

Solidity libraries and utilities provided by Axelar.
27 stars 30 forks source link

fix(storageLayout, readme): update hardhat config for storageLayout and updated readme #182

Closed ahramy closed 1 month ago

ahramy commented 1 month ago

Issue:

AXE-4606

Executing the command STORAGE_LAYOUT=true npx hardhat check returns:

Table has empty fields

Fix

added outputSelection configuration for storageLayout.

After Fix:

STORAGE_LAYOUT=true npm run check

┌───────────────────────────────────┬──────────────────────┬──────────────┬────────┬────────────────────────────────────────────────────────────────────────┬─────┬───────────────────────────────────────────────────┬───────────────┐
│             contract              │    state_variable    │ storage_slot │ offset │                                  type                                  │ idx │                     artifact                      │ numberOfBytes │
├───────────────────────────────────┼──────────────────────┼──────────────┼────────┼────────────────────────────────────────────────────────────────────────┼─────┼───────────────────────────────────────────────────┼───────────────┤
│      AxelarServiceGovernance      │   governanceChain    │      0       │   0    │                            t_string_storage                            │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│      AxelarServiceGovernance      │  governanceAddress   │      1       │   0    │                            t_string_storage                            │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│      AxelarServiceGovernance      │       multisig       │      2       │   0    │                               t_address                                │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      20       │
│      AxelarServiceGovernance      │  multisigApprovals   │      3       │   0    │                      t_mapping(t_bytes32,t_bool)                       │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│ AxelarValuedExpressExecutableTest │      callValue       │      0       │   0    │                               t_uint256                                │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│ AxelarValuedExpressExecutableTest │  callWithTokenValue  │      1       │   0    │                               t_uint256                                │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│ AxelarValuedExpressExecutableTest │     expressToken     │      2       │   0    │                               t_address                                │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      20       │
│           BaseMultisig            │       signers        │      0       │   0    │                     t_struct(Signers)3567_storage                      │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      96       │
│           BaseMultisig            │     signerEpoch      │      3       │   0    │                               t_uint256                                │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│           BaseMultisig            │    votingPerTopic    │      4       │   0    │ t_mapping(t_uint256,t_mapping(t_bytes32,t_struct(Voting)3557_storage)) │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│           BaseMultisig            │       signers        │      0       │   0    │                      t_struct(Signers)23_storage                       │  5  │ /build-info/62eedd0ba5425b53bf19cd779a831736.json │      96       │
│           BaseMultisig            │     signerEpoch      │      3       │   0    │                               t_uint256                                │  5  │ /build-info/62eedd0ba5425b53bf19cd779a831736.json │      32       │
│           BaseMultisig            │    votingPerTopic    │      4       │   0    │  t_mapping(t_uint256,t_mapping(t_bytes32,t_struct(Voting)13_storage))  │  5  │ /build-info/62eedd0ba5425b53bf19cd779a831736.json │      32       │
│   DestinationChainTokenSwapper    │        tokenA        │      0       │   0    │                               t_address                                │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      20       │
│   DestinationChainTokenSwapper    │        tokenB        │      1       │   0    │                               t_address                                │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      20       │
│   DifferentProxyImplementation    │        value         │      0       │   0    │                               t_uint256                                │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│   DifferentProxyImplementation    │         name         │      1       │   0    │                            t_string_storage                            │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│               ERC20               │      balanceOf       │      0       │   0    │                     t_mapping(t_address,t_uint256)                     │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│               ERC20               │      allowance       │      1       │   0    │          t_mapping(t_address,t_mapping(t_address,t_uint256))           │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│               ERC20               │     totalSupply      │      2       │   0    │                               t_uint256                                │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│               ERC20               │         name         │      3       │   0    │                            t_string_storage                            │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│               ERC20               │        symbol        │      4       │   0    │                            t_string_storage                            │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│       ERC20MintableBurnable       │      balanceOf       │      0       │   0    │                     t_mapping(t_address,t_uint256)                     │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│       ERC20MintableBurnable       │      allowance       │      1       │   0    │          t_mapping(t_address,t_mapping(t_address,t_uint256))           │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│       ERC20MintableBurnable       │     totalSupply      │      2       │   0    │                               t_uint256                                │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│       ERC20MintableBurnable       │         name         │      3       │   0    │                            t_string_storage                            │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│       ERC20MintableBurnable       │        symbol        │      4       │   0    │                            t_string_storage                            │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│     ERC20MintableBurnableInit     │      balanceOf       │      0       │   0    │                     t_mapping(t_address,t_uint256)                     │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│     ERC20MintableBurnableInit     │      allowance       │      1       │   0    │          t_mapping(t_address,t_mapping(t_address,t_uint256))           │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│     ERC20MintableBurnableInit     │     totalSupply      │      2       │   0    │                               t_uint256                                │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│     ERC20MintableBurnableInit     │         name         │      3       │   0    │                            t_string_storage                            │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│     ERC20MintableBurnableInit     │        symbol        │      4       │   0    │                            t_string_storage                            │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│         ExecutableSample          │        value         │      0       │   0    │                            t_string_storage                            │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│         ExecutableSample          │     sourceChain      │      1       │   0    │                            t_string_storage                            │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│         ExecutableSample          │    sourceAddress     │      2       │   0    │                            t_string_storage                            │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│        FixedImplementation        │        value         │      0       │   0    │                               t_uint256                                │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│       InterchainGovernance        │   governanceChain    │      0       │   0    │                            t_string_storage                            │  1  │ /build-info/37f6c6ce0b0dcaa7a2943902d1c8ce2f.json │      32       │
│       InterchainGovernance        │  governanceAddress   │      1       │   0    │                            t_string_storage                            │  1  │ /build-info/37f6c6ce0b0dcaa7a2943902d1c8ce2f.json │      32       │
│       InterchainGovernance        │   governanceChain    │      0       │   0    │                            t_string_storage                            │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│       InterchainGovernance        │  governanceAddress   │      1       │   0    │                            t_string_storage                            │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│            MockGateway            │        bools         │      0       │   0    │                      t_mapping(t_bytes32,t_bool)                       │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│            MockGateway            │      addresses       │      1       │   0    │                     t_mapping(t_bytes32,t_address)                     │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│            MockGateway            │        uints         │      2       │   0    │                     t_mapping(t_bytes32,t_uint256)                     │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│            MockGateway            │       strings        │      3       │   0    │                 t_mapping(t_bytes32,t_string_storage)                  │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│            MockGateway            │       bytes32s       │      4       │   0    │                     t_mapping(t_bytes32,t_bytes32)                     │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│             Multisig              │       signers        │      0       │   0    │                      t_struct(Signers)23_storage                       │  5  │ /build-info/62eedd0ba5425b53bf19cd779a831736.json │      96       │
│             Multisig              │     signerEpoch      │      3       │   0    │                               t_uint256                                │  5  │ /build-info/62eedd0ba5425b53bf19cd779a831736.json │      32       │
│             Multisig              │    votingPerTopic    │      4       │   0    │  t_mapping(t_uint256,t_mapping(t_bytes32,t_struct(Voting)13_storage))  │  5  │ /build-info/62eedd0ba5425b53bf19cd779a831736.json │      32       │
│             Operators             │      operators       │      0       │   0    │                      t_mapping(t_address,t_bool)                       │  7  │ /build-info/c3a10429a6a58806b1f2f298138f183a.json │      32       │
│        ProxyImplementation        │        value         │      0       │   0    │                               t_uint256                                │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│        ProxyImplementation        │         name         │      1       │   0    │                            t_string_storage                            │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│         SourceChainSender         │       gateway        │      0       │   0    │                     t_contract(IAxelarGateway)6662                     │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      20       │
│         SourceChainSender         │   destinationChain   │      1       │   0    │                            t_string_storage                            │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│         SourceChainSender         │  executableAddress   │      2       │   0    │                            t_string_storage                            │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│       SourceChainSwapCaller       │       gateway        │      0       │   0    │                     t_contract(IAxelarGateway)6662                     │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      20       │
│       SourceChainSwapCaller       │   destinationChain   │      1       │   0    │                            t_string_storage                            │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│       SourceChainSwapCaller       │  executableAddress   │      2       │   0    │                            t_string_storage                            │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│         TestBaseMultisig          │       signers        │      0       │   0    │                     t_struct(Signers)3567_storage                      │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      96       │
│         TestBaseMultisig          │     signerEpoch      │      3       │   0    │                               t_uint256                                │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│         TestBaseMultisig          │    votingPerTopic    │      4       │   0    │ t_mapping(t_uint256,t_mapping(t_bytes32,t_struct(Voting)3557_storage)) │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│        TestImplementation         │         val          │      0       │   0    │                               t_uint256                                │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│   TestInterchainAddressTracker    │         name         │      0       │   0    │                            t_string_storage                            │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│     TestInterchainGovernance      │   governanceChain    │      0       │   0    │                            t_string_storage                            │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│     TestInterchainGovernance      │  governanceAddress   │      1       │   0    │                            t_string_storage                            │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│           TestMulticall           │        nonce         │      0       │   0    │                               t_uint256                                │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│           TestMulticall           │ lastMulticallReturns │      1       │   0    │                  t_array(t_bytes_storage)dyn_storage                   │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│            TestOwnable            │         num          │      0       │   0    │                               t_uint256                                │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│        TestReentrancyGuard        │        value         │      0       │   0    │                               t_uint256                                │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│             TestRoles             │         num          │      0       │   0    │                               t_uint256                                │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│          TestUpgradable           │         num          │      0       │   0    │                               t_uint256                                │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
│           TimeLockTest            │         num          │      0       │   0    │                               t_uint256                                │  4  │ /build-info/60bb168fe67f6c0d00e938528f838df5.json │      32       │
└───────────────────────────────────┴──────────────────────┴──────────────┴────────┴────────────────────────────────────────────────────────────────────────┴─────┴───────────────────────────────────────────────────┴───────────────┘
codecov-commenter commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.69%. Comparing base (3eea612) to head (eda7312). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #182 +/- ## ======================================= Coverage 98.69% 98.69% ======================================= Files 48 48 Lines 764 764 Branches 160 160 ======================================= Hits 754 754 Misses 1 1 Partials 9 9 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.