creation_sourcecode: {{
    "sources": {
      "lib/aave-helpers/lib/aave-address-book/src/GovernanceV3.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {Errors} from './governance-v3/Errors.sol';\nimport {IBaseReceiverPortal} from './governance-v3/IBaseReceiverPortal.sol';\nimport {IDataWarehouse} from './governance-v3/IDataWarehouse.sol';\nimport {IExecutor} from './governance-v3/IExecutor.sol';\nimport {IGovernanceCore} from './governance-v3/IGovernanceCore.sol';\nimport {IGovernancePowerStrategy} from './governance-v3/IGovernancePowerStrategy.sol';\nimport {IPayloadsControllerCore} from './governance-v3/IPayloadsControllerCore.sol';\nimport {IVotingMachineWithProofs} from './governance-v3/IVotingMachineWithProofs.sol';\nimport {IVotingPortal} from './governance-v3/IVotingPortal.sol';\nimport {IVotingStrategy} from './governance-v3/IVotingStrategy.sol';\nimport {PayloadsControllerUtils} from './governance-v3/PayloadsControllerUtils.sol';\n"
      },
      "lib/aave-helpers/lib/aave-address-book/src/GovernanceV3Ethereum.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.0;\n\n// AUTOGENERATED - MANUALLY CHANGES WILL BE REVERTED BY THE GENERATOR\nimport {IGovernanceCore, IPayloadsControllerCore, IDataWarehouse, IVotingStrategy} from './GovernanceV3.sol';\n\nlibrary GovernanceV3Ethereum {\n  // https://etherscan.io/address/0xEd42a7D8559a463722Ca4beD50E0Cc05a386b0e1\n  address internal constant CROSS_CHAIN_CONTROLLER = 0xEd42a7D8559a463722Ca4beD50E0Cc05a386b0e1;\n\n  // https://etherscan.io/address/0x9AEE0B04504CeF83A65AC3f0e838D0593BCb2BC7\n  IGovernanceCore internal constant GOVERNANCE =\n    IGovernanceCore(0x9AEE0B04504CeF83A65AC3f0e838D0593BCb2BC7);\n\n  // https://etherscan.io/address/0xdAbad81aF85554E9ae636395611C58F7eC1aAEc5\n  IPayloadsControllerCore internal constant PAYLOADS_CONTROLLER =\n    IPayloadsControllerCore(0xdAbad81aF85554E9ae636395611C58F7eC1aAEc5);\n\n  // https://etherscan.io/address/0x617332a777780F546261247F621051d0b98975Eb\n  address internal constant VOTING_MACHINE = 0x617332a777780F546261247F621051d0b98975Eb;\n\n  // https://etherscan.io/address/0xf23f7De3AC42F22eBDA17e64DC4f51FB66b8E21f\n  address internal constant VOTING_PORTAL_ETH_ETH = 0xf23f7De3AC42F22eBDA17e64DC4f51FB66b8E21f;\n\n  // https://etherscan.io/address/0x33aCEf7365809218485873B7d0d67FeE411B5D79\n  address internal constant VOTING_PORTAL_ETH_AVAX = 0x33aCEf7365809218485873B7d0d67FeE411B5D79;\n\n  // https://etherscan.io/address/0x9b24C168d6A76b5459B1d47071a54962a4df36c3\n  address internal constant VOTING_PORTAL_ETH_POL = 0x9b24C168d6A76b5459B1d47071a54962a4df36c3;\n\n  // https://etherscan.io/address/0xE3B770Dc4ae3f8bECaB3Ed12dE692c741603e16A\n  address internal constant PC_DATA_HELPER = 0xE3B770Dc4ae3f8bECaB3Ed12dE692c741603e16A;\n\n  // https://etherscan.io/address/0x971c82c8316aD611904F95616c21ce90837f1856\n  address internal constant GOV_DATA_HELPER = 0x971c82c8316aD611904F95616c21ce90837f1856;\n\n  // https://etherscan.io/address/0x77976B51569896523EE215962Ee91ff236Fa50E8\n  address internal constant VM_DATA_HELPER = 0x77976B51569896523EE215962Ee91ff236Fa50E8;\n\n  // https://etherscan.io/address/0x94363B11b37BC3ffe43AB09cff5A010352FE85dC\n  address internal constant META_DELEGATE_HELPER = 0x94363B11b37BC3ffe43AB09cff5A010352FE85dC;\n\n  // https://etherscan.io/address/0x73C6Fb358dDA8e84D50e98A98F7c0dF32e15C7e9\n  address internal constant EMERGENCY_REGISTRY = 0x73C6Fb358dDA8e84D50e98A98F7c0dF32e15C7e9;\n\n  // https://etherscan.io/address/0xa198Fac58E02A5C5F8F7e877895d50cFa9ad1E04\n  address internal constant GOVERNANCE_POWER_STRATEGY = 0xa198Fac58E02A5C5F8F7e877895d50cFa9ad1E04;\n\n  // https://etherscan.io/address/0x5300A1a15135EA4dc7aD5a167152C01EFc9b192A\n  address internal constant EXECUTOR_LVL_1 = 0x5300A1a15135EA4dc7aD5a167152C01EFc9b192A;\n\n  // https://etherscan.io/address/0x17Dd33Ed0e3dD2a80E37489B8A63063161BE6957\n  address internal constant EXECUTOR_LVL_2 = 0x17Dd33Ed0e3dD2a80E37489B8A63063161BE6957;\n\n  // https://etherscan.io/address/0x5642A5A5Ec284B4145563aBF319620204aCCA7f4\n  IVotingStrategy internal constant VOTING_STRATEGY =\n    IVotingStrategy(0x5642A5A5Ec284B4145563aBF319620204aCCA7f4);\n\n  // https://etherscan.io/address/0x1699FE9CaDC8a0b6c93E06B62Ab4592a0fFEcF61\n  IDataWarehouse internal constant DATA_WAREHOUSE =\n    IDataWarehouse(0x1699FE9CaDC8a0b6c93E06B62Ab4592a0fFEcF61);\n}\n"
      },
      "lib/aave-helpers/lib/aave-address-book/src/common/ICrossChainController.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IRescuable} from './IRescuable.sol';\n\nlibrary EnumerableSet {\n  // To implement this library for multiple types with as little code\n  // repetition as possible, we write it in terms of a generic Set type with\n  // bytes32 values.\n  // The Set implementation uses private functions, and user-facing\n  // implementations (such as AddressSet) are just wrappers around the\n  // underlying Set.\n  // This means that we can only create new EnumerableSets for types that fit\n  // in bytes32.\n\n  struct Set {\n    // Storage of set values\n    bytes32[] _values;\n    // Position of the value in the `values` array, plus 1 because index 0\n    // means a value is not in the set.\n    mapping(bytes32 => uint256) _indexes;\n  }\n\n  /**\n   * @dev Add a value to a set. O(1).\n   *\n   * Returns true if the value was added to the set, that is if it was not\n   * already present.\n   */\n  function _add(Set storage set, bytes32 value) private returns (bool) {\n    if (!_contains(set, value)) {\n      set._values.push(value);\n      // The value is stored at length-1, but we add 1 to all indexes\n      // and use 0 as a sentinel value\n      set._indexes[value] = set._values.length;\n      return true;\n    } else {\n      return false;\n    }\n  }\n\n  /**\n   * @dev Removes a value from a set. O(1).\n   *\n   * Returns true if the value was removed from the set, that is if it was\n   * present.\n   */\n  function _remove(Set storage set, bytes32 value) private returns (bool) {\n    // We read and store the value's index to prevent multiple reads from the same storage slot\n    uint256 valueIndex = set._indexes[value];\n\n    if (valueIndex != 0) {\n      // Equivalent to contains(set, value)\n      // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\n      // the array, and then remove the last element (sometimes called as 'swap and pop').\n      // This modifies the order of the array, as noted in {at}.\n\n      uint256 toDeleteIndex = valueIndex - 1;\n      uint256 lastIndex = set._values.length - 1;\n\n      if (lastIndex != toDeleteIndex) {\n        bytes32 lastValue = set._values[lastIndex];\n\n        // Move the last value to the index where the value to delete is\n        set._values[toDeleteIndex] = lastValue;\n        // Update the index for the moved value\n        set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\n      }\n\n      // Delete the slot where the moved value was stored\n      set._values.pop();\n\n      // Delete the index for the deleted slot\n      delete set._indexes[value];\n\n      return true;\n    } else {\n      return false;\n    }\n  }\n\n  /**\n   * @dev Returns true if the value is in the set. O(1).\n   */\n  function _contains(Set storage set, bytes32 value) private view returns (bool) {\n    return set._indexes[value] != 0;\n  }\n\n  /**\n   * @dev Returns the number of values on the set. O(1).\n   */\n  function _length(Set storage set) private view returns (uint256) {\n    return set._values.length;\n  }\n\n  /**\n   * @dev Returns the value stored at position `index` in the set. O(1).\n   *\n   * Note that there are no guarantees on the ordering of values inside the\n   * array, and it may change when more values are added or removed.\n   *\n   * Requirements:\n   *\n   * - `index` must be strictly less than {length}.\n   */\n  function _at(Set storage set, uint256 index) private view returns (bytes32) {\n    return set._values[index];\n  }\n\n  /**\n   * @dev Return the entire set in an array\n   *\n   * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n   * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n   * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n   * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n   */\n  function _values(Set storage set) private view returns (bytes32[] memory) {\n    return set._values;\n  }\n\n  // Bytes32Set\n\n  struct Bytes32Set {\n    Set _inner;\n  }\n\n  /**\n   * @dev Add a value to a set. O(1).\n   *\n   * Returns true if the value was added to the set, that is if it was not\n   * already present.\n   */\n  function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n    return _add(set._inner, value);\n  }\n\n  /**\n   * @dev Removes a value from a set. O(1).\n   *\n   * Returns true if the value was removed from the set, that is if it was\n   * present.\n   */\n  function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n    return _remove(set._inner, value);\n  }\n\n  /**\n   * @dev Returns true if the value is in the set. O(1).\n   */\n  function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\n    return _contains(set._inner, value);\n  }\n\n  /**\n   * @dev Returns the number of values in the set. O(1).\n   */\n  function length(Bytes32Set storage set) internal view returns (uint256) {\n    return _length(set._inner);\n  }\n\n  /**\n   * @dev Returns the value stored at position `index` in the set. O(1).\n   *\n   * Note that there are no guarantees on the ordering of values inside the\n   * array, and it may change when more values are added or removed.\n   *\n   * Requirements:\n   *\n   * - `index` must be strictly less than {length}.\n   */\n  function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\n    return _at(set._inner, index);\n  }\n\n  /**\n   * @dev Return the entire set in an array\n   *\n   * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n   * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n   * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n   * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n   */\n  function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\n    bytes32[] memory store = _values(set._inner);\n    bytes32[] memory result;\n\n    /// @solidity memory-safe-assembly\n    assembly {\n      result := store\n    }\n\n    return result;\n  }\n\n  // AddressSet\n\n  struct AddressSet {\n    Set _inner;\n  }\n\n  /**\n   * @dev Add a value to a set. O(1).\n   *\n   * Returns true if the value was added to the set, that is if it was not\n   * already present.\n   */\n  function add(AddressSet storage set, address value) internal returns (bool) {\n    return _add(set._inner, bytes32(uint256(uint160(value))));\n  }\n\n  /**\n   * @dev Removes a value from a set. O(1).\n   *\n   * Returns true if the value was removed from the set, that is if it was\n   * present.\n   */\n  function remove(AddressSet storage set, address value) internal returns (bool) {\n    return _remove(set._inner, bytes32(uint256(uint160(value))));\n  }\n\n  /**\n   * @dev Returns true if the value is in the set. O(1).\n   */\n  function contains(AddressSet storage set, address value) internal view returns (bool) {\n    return _contains(set._inner, bytes32(uint256(uint160(value))));\n  }\n\n  /**\n   * @dev Returns the number of values in the set. O(1).\n   */\n  function length(AddressSet storage set) internal view returns (uint256) {\n    return _length(set._inner);\n  }\n\n  /**\n   * @dev Returns the value stored at position `index` in the set. O(1).\n   *\n   * Note that there are no guarantees on the ordering of values inside the\n   * array, and it may change when more values are added or removed.\n   *\n   * Requirements:\n   *\n   * - `index` must be strictly less than {length}.\n   */\n  function at(AddressSet storage set, uint256 index) internal view returns (address) {\n    return address(uint160(uint256(_at(set._inner, index))));\n  }\n\n  /**\n   * @dev Return the entire set in an array\n   *\n   * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n   * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n   * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n   * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n   */\n  function values(AddressSet storage set) internal view returns (address[] memory) {\n    bytes32[] memory store = _values(set._inner);\n    address[] memory result;\n\n    /// @solidity memory-safe-assembly\n    assembly {\n      result := store\n    }\n\n    return result;\n  }\n\n  // UintSet\n\n  struct UintSet {\n    Set _inner;\n  }\n\n  /**\n   * @dev Add a value to a set. O(1).\n   *\n   * Returns true if the value was added to the set, that is if it was not\n   * already present.\n   */\n  function add(UintSet storage set, uint256 value) internal returns (bool) {\n    return _add(set._inner, bytes32(value));\n  }\n\n  /**\n   * @dev Removes a value from a set. O(1).\n   *\n   * Returns true if the value was removed from the set, that is if it was\n   * present.\n   */\n  function remove(UintSet storage set, uint256 value) internal returns (bool) {\n    return _remove(set._inner, bytes32(value));\n  }\n\n  /**\n   * @dev Returns true if the value is in the set. O(1).\n   */\n  function contains(UintSet storage set, uint256 value) internal view returns (bool) {\n    return _contains(set._inner, bytes32(value));\n  }\n\n  /**\n   * @dev Returns the number of values in the set. O(1).\n   */\n  function length(UintSet storage set) internal view returns (uint256) {\n    return _length(set._inner);\n  }\n\n  /**\n   * @dev Returns the value stored at position `index` in the set. O(1).\n   *\n   * Note that there are no guarantees on the ordering of values inside the\n   * array, and it may change when more values are added or removed.\n   *\n   * Requirements:\n   *\n   * - `index` must be strictly less than {length}.\n   */\n  function at(UintSet storage set, uint256 index) internal view returns (uint256) {\n    return uint256(_at(set._inner, index));\n  }\n\n  /**\n   * @dev Return the entire set in an array\n   *\n   * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n   * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n   * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n   * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n   */\n  function values(UintSet storage set) internal view returns (uint256[] memory) {\n    bytes32[] memory store = _values(set._inner);\n    uint256[] memory result;\n\n    /// @solidity memory-safe-assembly\n    assembly {\n      result := store\n    }\n\n    return result;\n  }\n}\n\n/**\n * @notice Object with the necessary information to define a unique envelope\n * @param nonce sequential (unique) numeric indicator of the Envelope creation\n * @param origin address that originated the bridging of a message\n * @param destination address where the message needs to be sent\n * @param originChainId id of the chain where the message originated\n * @param destinationChainId id of the chain where the message needs to be bridged\n * @param message bytes that needs to be bridged\n */\nstruct Envelope {\n  uint256 nonce;\n  address origin;\n  address destination;\n  uint256 originChainId;\n  uint256 destinationChainId;\n  bytes message;\n}\n\n/**\n * @notice Object containing the information of an envelope for internal usage\n * @param data bytes of the encoded envelope\n * @param id hash of the encoded envelope\n */\nstruct EncodedEnvelope {\n  bytes data;\n  bytes32 id;\n}\n\n/**\n * @title EnvelopeUtils library\n * @author BGD Labs\n * @notice Defines utility functions for Envelopes\n */\nlibrary EnvelopeUtils {\n  /**\n   * @notice method that encodes an Envelope and generates its id\n   * @param envelope object with the routing information necessary to send a message to a destination chain\n   * @return object containing the encoded envelope and the envelope id\n   */\n  function encode(Envelope memory envelope) internal pure returns (EncodedEnvelope memory) {\n    EncodedEnvelope memory encodedEnvelope;\n    encodedEnvelope.data = abi.encode(envelope);\n    encodedEnvelope.id = getId(encodedEnvelope.data);\n    return encodedEnvelope;\n  }\n\n  /**\n   * @notice method to decode and encoded envelope to its raw parameters\n   * @param envelope bytes with the encoded envelope data\n   * @return object with the decoded envelope information\n   */\n  function decode(bytes memory envelope) internal pure returns (Envelope memory) {\n    return abi.decode(envelope, (Envelope));\n  }\n\n  /**\n   * @notice method to get an envelope's id\n   * @param envelope object with the routing information necessary to send a message to a destination chain\n   * @return hash id of the envelope\n   */\n  function getId(Envelope memory envelope) internal pure returns (bytes32) {\n    EncodedEnvelope memory encodedEnvelope = encode(envelope);\n    return encodedEnvelope.id;\n  }\n\n  /**\n   * @notice method to get an envelope's id\n   * @param envelope bytes with the encoded envelope data\n   * @return hash id of the envelope\n   */\n  function getId(bytes memory envelope) internal pure returns (bytes32) {\n    return keccak256(envelope);\n  }\n}\n\n/**\n * @notice Object with the necessary information to send an envelope to a bridge\n * @param nonce sequential (unique) numeric indicator of the Transaction creation\n * @param encodedEnvelope bytes of an encoded envelope object\n */\nstruct Transaction {\n  uint256 nonce;\n  bytes encodedEnvelope;\n}\n\n/**\n * @notice Object containing the information of a transaction for internal usage\n * @param data bytes of the encoded transaction\n * @param id hash of the encoded transaction\n */\nstruct EncodedTransaction {\n  bytes data;\n  bytes32 id;\n}\n\n/**\n * @title TransactionUtils library\n * @author BGD Labs\n * @notice Defines utility functions for Transactions\n */\nlibrary TransactionUtils {\n  /**\n   * @notice method that encodes a Transaction and generates its id\n   * @param transaction object with the information necessary to send an envelope to a bridge\n   * @return object containing the encoded transaction and the transaction id\n   */\n  function encode(\n    Transaction memory transaction\n  ) internal pure returns (EncodedTransaction memory) {\n    EncodedTransaction memory encodedTransaction;\n    encodedTransaction.data = abi.encode(transaction);\n    encodedTransaction.id = getId(encodedTransaction.data);\n    return encodedTransaction;\n  }\n\n  /**\n   * @notice method that decodes an encoded transaction (bytes) into a Transaction object\n   * @param transaction encoded transaction object\n   * @return object containing the decoded Transaction object\n   */\n  function decode(bytes memory transaction) internal pure returns (Transaction memory) {\n    return abi.decode(transaction, (Transaction));\n  }\n\n  /**\n   * @notice method to get a transaction id\n   * @param transaction object with the information necessary to send an envelope to a bridge\n   * @return hash id of the transaction\n   */\n  function getId(Transaction memory transaction) internal pure returns (bytes32) {\n    EncodedTransaction memory encodedTransaction = encode(transaction);\n    return encodedTransaction.id;\n  }\n\n  /**\n   * @notice method to get a transaction id\n   * @param transaction encoded transaction object\n   * @return hash id of the transaction\n   */\n  function getId(bytes memory transaction) internal pure returns (bytes32) {\n    return keccak256(transaction);\n  }\n\n  /**\n   * @notice method to get the envelope information from the transaction object\n   * @param transaction object with the information necessary to send an envelope to a bridge\n   * @return object with decoded information of the envelope in the transaction\n   */\n  function getEnvelope(Transaction memory transaction) internal pure returns (Envelope memory) {\n    return EnvelopeUtils.decode(transaction.encodedEnvelope);\n  }\n\n  /**\n   * @notice method to get the envelope id from the transaction object\n   * @param transaction object with the information necessary to send an envelope to a bridge\n   * @return hash id of the envelope on a transaction\n   */\n  function getEnvelopeId(Transaction memory transaction) internal pure returns (bytes32) {\n    return EnvelopeUtils.getId(transaction.encodedEnvelope);\n  }\n}\n\ninterface ICrossChainReceiver {\n  /**\n   * @notice object with information to set new required confirmations\n   * @param chainId id of the origin chain\n   * @param requiredConfirmations required confirmations to set a message as confirmed\n   */\n  struct ConfirmationInput {\n    uint256 chainId;\n    uint8 requiredConfirmations;\n  }\n\n  /**\n   * @notice object with information to set new validity timestamp\n   * @param chainId id of the origin chain\n   * @param validityTimestamp new timestamp in seconds to set as validity point\n   */\n  struct ValidityTimestampInput {\n    uint256 chainId;\n    uint120 validityTimestamp;\n  }\n\n  /**\n   * @notice object with necessary information to configure bridge adapters\n   * @param bridgeAdapter address of the bridge adapter to configure\n   * @param chainIds array of ids of the chains the adapter receives messages from\n   */\n  struct ReceiverBridgeAdapterConfigInput {\n    address bridgeAdapter;\n    uint256[] chainIds;\n  }\n\n  /**\n   * @notice object containing the receiver configuration\n   * @param requiredConfirmation number of bridges that are needed to make a bridged message valid from origin chain\n   * @param validityTimestamp all messages originated but not finally confirmed before this timestamp per origin chain, are invalid\n   */\n  struct ReceiverConfiguration {\n    uint8 requiredConfirmation;\n    uint120 validityTimestamp;\n  }\n\n  /**\n   * @notice object with full information of the receiver configuration for a chain\n   * @param configuration object containing the specifications of the receiver for a chain\n   * @param allowedBridgeAdapters stores if a bridge adapter is allowed for a chain\n   */\n  struct ReceiverConfigurationFull {\n    ReceiverConfiguration configuration;\n    EnumerableSet.AddressSet allowedBridgeAdapters;\n  }\n\n  /**\n   * @notice object that stores the internal information of the transaction\n   * @param confirmations number of times that this transaction has been bridged\n   * @param firstBridgedAt timestamp in seconds indicating the first time a transaction was received\n   */\n  struct TransactionStateWithoutAdapters {\n    uint8 confirmations;\n    uint120 firstBridgedAt;\n  }\n  /**\n   * @notice object that stores the internal information of the transaction with bridge adapters state\n   * @param confirmations number of times that this transactions has been bridged\n   * @param firstBridgedAt timestamp in seconds indicating the first time a transaction was received\n   * @param bridgedByAdapter list of bridge adapters that have bridged the message\n   */\n  struct TransactionState {\n    uint8 confirmations;\n    uint120 firstBridgedAt;\n    mapping(address => bool) bridgedByAdapter;\n  }\n\n  /**\n   * @notice object with the current state of an envelope\n   * @param confirmed boolean indicating if the bridged message has been confirmed by the infrastructure\n   * @param delivered boolean indicating if the bridged message has been delivered to the destination\n   */\n  enum EnvelopeState {\n    None,\n    Confirmed,\n    Delivered\n  }\n\n  /**\n   * @notice emitted when a transaction has been received successfully\n   * @param transactionId id of the transaction\n   * @param envelopeId id of the envelope\n   * @param originChainId id of the chain where the envelope originated\n   * @param transaction the Transaction type data\n   * @param bridgeAdapter address of the bridge adapter who received the message (deployed on current network)\n   * @param confirmations number of current confirmations for this message\n   */\n  event TransactionReceived(\n    bytes32 transactionId,\n    bytes32 indexed envelopeId,\n    uint256 indexed originChainId,\n    Transaction transaction,\n    address indexed bridgeAdapter,\n    uint8 confirmations\n  );\n\n  /**\n   * @notice emitted when an envelope has been delivery attempted\n   * @param envelopeId id of the envelope\n   * @param envelope the Envelope type data\n   * @param isDelivered flag indicating if the message has been delivered successfully\n   */\n  event EnvelopeDeliveryAttempted(bytes32 envelopeId, Envelope envelope, bool isDelivered);\n\n  /**\n   * @notice emitted when a bridge adapter gets updated (allowed or disallowed)\n   * @param bridgeAdapter address of the updated bridge adapter\n   * @param allowed boolean indicating if the bridge adapter has been allowed or disallowed\n   * @param chainId id of the chain updated\n   */\n  event ReceiverBridgeAdaptersUpdated(\n    address indexed bridgeAdapter,\n    bool indexed allowed,\n    uint256 indexed chainId\n  );\n\n  /**\n   * @notice emitted when number of confirmations needed to validate a message changes\n   * @param newConfirmations number of new confirmations needed for a message to be valid\n   * @param chainId id of the chain updated\n   */\n  event ConfirmationsUpdated(uint8 newConfirmations, uint256 indexed chainId);\n\n  /**\n   * @notice emitted when a new timestamp for invalidations gets set\n   * @param invalidTimestamp timestamp to invalidate previous messages\n   * @param chainId id of the chain updated\n   */\n  event NewInvalidation(uint256 invalidTimestamp, uint256 indexed chainId);\n\n  /**\n   * @notice method to get the current allowed receiver bridge adapters for a chain\n   * @param chainId id of the chain to get the allowed bridge adapter list\n   * @return the list of allowed bridge adapters\n   */\n  function getReceiverBridgeAdaptersByChain(\n    uint256 chainId\n  ) external view returns (address[] memory);\n\n  /**\n   * @notice method to get the current supported chains (at least one allowed bridge adapter)\n   * @return list of supported chains\n   */\n  function getSupportedChains() external view returns (uint256[] memory);\n\n  /**\n   * @notice method to get the current configuration of a chain\n   * @param chainId id of the chain to get the configuration from\n   * @return the specified chain configuration object\n   */\n  function getConfigurationByChain(\n    uint256 chainId\n  ) external view returns (ReceiverConfiguration memory);\n\n  /**\n   * @notice method to get if a bridge adapter is allowed\n   * @param bridgeAdapter address of the bridge adapter to check\n   * @param chainId id of the chain to check\n   * @return boolean indicating if bridge adapter is allowed\n   */\n  function isReceiverBridgeAdapterAllowed(\n    address bridgeAdapter,\n    uint256 chainId\n  ) external view returns (bool);\n\n  /**\n   * @notice  method to get the current state of a transaction\n   * @param transactionId the id of transaction\n   * @return number of confirmations of internal message identified by the transactionId and the updated timestamp\n   */\n  function getTransactionState(\n    bytes32 transactionId\n  ) external view returns (TransactionStateWithoutAdapters memory);\n\n  /**\n   * @notice  method to get the internal transaction information\n   * @param transaction Transaction type data\n   * @return number of confirmations of internal message identified by internalId and the updated timestamp\n   */\n  function getTransactionState(\n    Transaction memory transaction\n  ) external view returns (TransactionStateWithoutAdapters memory);\n\n  /**\n   * @notice method to get the internal state of an envelope\n   * @param envelope the Envelope type data\n   * @return the envelope current state, containing if it has been confirmed and delivered\n   */\n  function getEnvelopeState(Envelope memory envelope) external view returns (EnvelopeState);\n\n  /**\n   * @notice method to get the internal state of an envelope\n   * @param envelopeId id of the envelope\n   * @return the envelope current state, containing if it has been confirmed and delivered\n   */\n  function getEnvelopeState(bytes32 envelopeId) external view returns (EnvelopeState);\n\n  /**\n   * @notice method to get if transaction has been received by bridge adapter\n   * @param transactionId id of the transaction as stored internally\n   * @param bridgeAdapter address of the bridge adapter to check if it has bridged the message\n   * @return boolean indicating if the message has been received\n   */\n  function isTransactionReceivedByAdapter(\n    bytes32 transactionId,\n    address bridgeAdapter\n  ) external view returns (bool);\n\n  /**\n   * @notice method to set a new timestamp from where the messages will be valid.\n   * @param newValidityTimestamp array of objects containing the chain and timestamp where all the previous unconfirmed\n            messages must be invalidated.\n   */\n  function updateMessagesValidityTimestamp(\n    ValidityTimestampInput[] memory newValidityTimestamp\n  ) external;\n\n  /**\n   * @notice method to update the number of confirmations necessary for the messages to be accepted as valid\n   * @param newConfirmations array of objects with the chainId and the new number of needed confirmations\n   */\n  function updateConfirmations(ConfirmationInput[] memory newConfirmations) external;\n\n  /**\n   * @notice method that receives a bridged transaction and tries to deliver the contents to destination if possible\n   * @param encodedTransaction bytes containing the bridged information\n   * @param originChainId id of the chain where the transaction originated\n   */\n  function receiveCrossChainMessage(\n    bytes memory encodedTransaction,\n    uint256 originChainId\n  ) external;\n\n  /**\n   * @notice method to deliver an envelope to its destination\n   * @param envelope the Envelope typed data\n   * @dev to deliver an envelope, it needs to have been previously confirmed and not delivered\n   */\n  function deliverEnvelope(Envelope memory envelope) external;\n\n  /**\n   * @notice method to add bridge adapters to the allowed list\n   * @param bridgeAdaptersInput array of objects with the new bridge adapters and supported chains\n   */\n  function allowReceiverBridgeAdapters(\n    ReceiverBridgeAdapterConfigInput[] memory bridgeAdaptersInput\n  ) external;\n\n  /**\n   * @notice method to remove bridge adapters from the allowed list\n   * @param bridgeAdaptersInput array of objects with the bridge adapters and supported chains to disallow\n   */\n  function disallowReceiverBridgeAdapters(\n    ReceiverBridgeAdapterConfigInput[] memory bridgeAdaptersInput\n  ) external;\n}\n\ninterface ICrossChainForwarder {\n  /**\n   * @notice object storing the connected pair of bridge adapters, on current and destination chain\n   * @param destinationBridgeAdapter address of the bridge adapter on the destination chain\n   * @param currentChainBridgeAdapter address of the bridge adapter deployed on current network\n   */\n  struct ChainIdBridgeConfig {\n    address destinationBridgeAdapter;\n    address currentChainBridgeAdapter;\n  }\n\n  /**\n   * @notice object with the necessary information to remove bridge adapters\n   * @param bridgeAdapter address of the bridge adapter to remove\n   * @param chainIds array of chain ids where the bridge adapter connects\n   */\n  struct BridgeAdapterToDisable {\n    address bridgeAdapter;\n    uint256[] chainIds;\n  }\n\n  /**\n   * @notice object storing the pair bridgeAdapter (current deployed chain) destination chain bridge adapter configuration\n   * @param currentChainBridgeAdapter address of the bridge adapter deployed on current chain\n   * @param destinationBridgeAdapter address of the bridge adapter on the destination chain\n   * @param destinationChainId id of the destination chain using our own nomenclature\n   */\n  struct ForwarderBridgeAdapterConfigInput {\n    address currentChainBridgeAdapter;\n    address destinationBridgeAdapter;\n    uint256 destinationChainId;\n  }\n\n  /**\n   * @notice emitted when a transaction is successfully forwarded through a bridge adapter\n   * @param envelopeId internal id of the envelope\n   * @param envelope the Envelope type data\n   */\n  event EnvelopeRegistered(bytes32 indexed envelopeId, Envelope envelope);\n\n  /**\n   * @notice emitted when a transaction forwarding is attempted through a bridge adapter\n   * @param transactionId id of the forwarded transaction\n   * @param envelopeId internal id of the envelope\n   * @param encodedTransaction object intended to be bridged\n   * @param destinationChainId id of the destination chain in our notation\n   * @param bridgeAdapter address of the bridge adapter that failed (deployed on current network)\n   * @param destinationBridgeAdapter address of the connected bridge adapter on destination chain\n   * @param adapterSuccessful adapter was able to forward the message\n   * @param returnData bytes with error information\n   */\n  event TransactionForwardingAttempted(\n    bytes32 transactionId,\n    bytes32 indexed envelopeId,\n    bytes encodedTransaction,\n    uint256 destinationChainId,\n    address indexed bridgeAdapter,\n    address destinationBridgeAdapter,\n    bool indexed adapterSuccessful,\n    bytes returnData\n  );\n\n  /**\n   * @notice emitted when a bridge adapter has been added to the allowed list\n   * @param destinationChainId id of the destination chain in our notation\n   * @param bridgeAdapter address of the bridge adapter added (deployed on current network)\n   * @param destinationBridgeAdapter address of the connected bridge adapter on destination chain\n   * @param allowed boolean indicating if the bridge adapter is allowed or disallowed\n   */\n  event BridgeAdapterUpdated(\n    uint256 indexed destinationChainId,\n    address indexed bridgeAdapter,\n    address destinationBridgeAdapter,\n    bool indexed allowed\n  );\n\n  /**\n   * @notice emitted when a sender has been updated\n   * @param sender address of the updated sender\n   * @param isApproved boolean that indicates if the sender has been approved or removed\n   */\n  event SenderUpdated(address indexed sender, bool indexed isApproved);\n\n  /**\n   * @notice method to get the current valid envelope nonce\n   * @return the current valid envelope nonce\n   */\n  function getCurrentEnvelopeNonce() external view returns (uint256);\n\n  /**\n   * @notice method to get the current valid transaction nonce\n   * @return the current valid transaction nonce\n   */\n  function getCurrentTransactionNonce() external view returns (uint256);\n\n  /**\n   * @notice method to check if a envelope has been previously forwarded.\n   * @param envelope the Envelope type data\n   * @return boolean indicating if the envelope has been registered\n   */\n  function isEnvelopeRegistered(Envelope memory envelope) external view returns (bool);\n\n  /**\n   * @notice method to check if a envelope has been previously forwarded.\n   * @param envelopeId the hashed id of the envelope\n   * @return boolean indicating if the envelope has been registered\n   */\n  function isEnvelopeRegistered(bytes32 envelopeId) external view returns (bool);\n\n  /**\n   * @notice method to get if a transaction has been forwarded\n   * @param transaction the Transaction type data\n   * @return flag indicating if a transaction has been forwarded\n   */\n  function isTransactionForwarded(Transaction memory transaction) external view returns (bool);\n\n  /**\n   * @notice method to get if a transaction has been forwarded\n   * @param transactionId hashed id of the transaction\n   * @return flag indicating if a transaction has been forwarded\n   */\n  function isTransactionForwarded(bytes32 transactionId) external view returns (bool);\n\n  /**\n   * @notice method called to initiate message forwarding to other networks.\n   * @param destinationChainId id of the destination chain where the message needs to be bridged\n   * @param destination address where the message is intended for\n   * @param gasLimit gas cost on receiving side of the message\n   * @param message bytes that need to be bridged\n   * @return internal id of the envelope and transaction\n   */\n  function forwardMessage(\n    uint256 destinationChainId,\n    address destination,\n    uint256 gasLimit,\n    bytes memory message\n  ) external returns (bytes32, bytes32);\n\n  /**\n   * @notice method called to re forward a previously sent envelope.\n   * @param envelope the Envelope type data\n   * @param gasLimit gas cost on receiving side of the message\n   * @return the transaction id that has the retried envelope\n   * @dev This method will send an existing Envelope using a new Transaction.\n   * @dev This method should be used when the intention is to send the Envelope as if it was a new message. This way on\n          the Receiver side it will start from 0 to count for the required confirmations. (usual use case would be for\n          when an envelope has been invalidated on Receiver side, and needs to be retried as a new message)\n   */\n  function retryEnvelope(Envelope memory envelope, uint256 gasLimit) external returns (bytes32);\n\n  /**\n   * @notice method to retry forwarding an already forwarded transaction\n   * @param encodedTransaction the encoded Transaction data\n   * @param gasLimit limit of gas to spend on forwarding per bridge\n   * @param bridgeAdaptersToRetry list of bridge adapters to be used for the transaction forwarding retry\n   * @dev This method will send an existing Transaction with its Envelope to the specified adapters.\n   * @dev Should be used when some of the bridges on the initial forwarding did not work (out of gas),\n          and we want the Transaction with Envelope to still account for the required confirmations on the Receiver side\n   */\n  function retryTransaction(\n    bytes memory encodedTransaction,\n    uint256 gasLimit,\n    address[] memory bridgeAdaptersToRetry\n  ) external;\n\n  /**\n   * @notice method to enable bridge adapters\n   * @param bridgeAdapters array of new bridge adapter configurations\n   */\n  function enableBridgeAdapters(ForwarderBridgeAdapterConfigInput[] memory bridgeAdapters) external;\n\n  /**\n   * @notice method to disable bridge adapters\n   * @param bridgeAdapters array of bridge adapter addresses to disable\n   */\n  function disableBridgeAdapters(BridgeAdapterToDisable[] memory bridgeAdapters) external;\n\n  /**\n   * @notice method to remove sender addresses\n   * @param senders list of addresses to remove\n   */\n  function removeSenders(address[] memory senders) external;\n\n  /**\n   * @notice method to approve new sender addresses\n   * @param senders list of addresses to approve\n   */\n  function approveSenders(address[] memory senders) external;\n\n  /**\n   * @notice method to get all the forwarder bridge adapters of a chain\n   * @param chainId id of the chain we want to get the adapters from\n   * @return an array of chain configurations where the bridge adapter can communicate\n   */\n  function getForwarderBridgeAdaptersByChain(\n    uint256 chainId\n  ) external view returns (ChainIdBridgeConfig[] memory);\n\n  /**\n   * @notice method to get if a sender is approved\n   * @param sender address that we want to check if approved\n   * @return boolean indicating if the address has been approved as sender\n   */\n  function isSenderApproved(address sender) external view returns (bool);\n}\n\n/**\n * @title IBaseCrossChainController\n * @author BGD Labs\n * @notice interface containing the objects, events and methods definitions of the CrossChainController contract\n */\ninterface ICrossChainController is IRescuable, ICrossChainForwarder, ICrossChainReceiver {\n\n}\n"
      },
      "lib/aave-helpers/lib/aave-address-book/src/common/IRescuable.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.8;\n\n/**\n * @title IRescuable\n * @author BGD Labs\n * @notice interface containing the objects, events and methods definitions of the Rescuable contract\n */\ninterface IRescuable {\n  /**\n   * @notice emitted when erc20 tokens get rescued\n   * @param caller address that triggers the rescue\n   * @param token address of the rescued token\n   * @param to address that will receive the rescued tokens\n   * @param amount quantity of tokens rescued\n   */\n  event ERC20Rescued(\n    address indexed caller,\n    address indexed token,\n    address indexed to,\n    uint256 amount\n  );\n\n  /**\n   * @notice emitted when native tokens get rescued\n   * @param caller address that triggers the rescue\n   * @param to address that will receive the rescued tokens\n   * @param amount quantity of tokens rescued\n   */\n  event NativeTokensRescued(address indexed caller, address indexed to, uint256 amount);\n\n  /**\n   * @notice method called to rescue tokens sent erroneously to the contract. Only callable by owner\n   * @param erc20Token address of the token to rescue\n   * @param to address to send the tokens\n   * @param amount of tokens to rescue\n   */\n  function emergencyTokenTransfer(address erc20Token, address to, uint256 amount) external;\n\n  /**\n   * @notice method called to rescue ether sent erroneously to the contract. Only callable by owner\n   * @param to address to send the eth\n   * @param amount of eth to rescue\n   */\n  function emergencyEtherTransfer(address to, uint256 amount) external;\n\n  /**\n   * @notice method that defines the address that is allowed to rescue tokens\n   * @return the allowed address\n   */\n  function whoCanRescue() external view returns (address);\n}\n"
      },
      "lib/aave-helpers/lib/aave-address-book/src/governance-v3/Errors.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nlibrary Errors {\n  string public constant VOTING_PORTALS_COUNT_NOT_0 = '1'; // to be able to rescue voting portals count must be 0\n  string public constant AT_LEAST_ONE_PAYLOAD = '2'; // to create a proposal, it must have at least one payload\n  string public constant VOTING_PORTAL_NOT_APPROVED = '3'; // the voting portal used to vote on proposal must be approved\n  string public constant PROPOSITION_POWER_IS_TOO_LOW = '4'; // proposition power of proposal creator must be equal or higher than the specified threshold for the access level\n  string public constant PROPOSAL_NOT_IN_CREATED_STATE = '5'; // proposal should be in the CREATED state\n  string public constant PROPOSAL_NOT_IN_ACTIVE_STATE = '6'; // proposal must be in an ACTIVE state\n  string public constant PROPOSAL_NOT_IN_QUEUED_STATE = '7'; // proposal must be in a QUEUED state\n  string public constant VOTING_START_COOLDOWN_PERIOD_NOT_PASSED = '8'; // to activate a proposal vote, the cool down delay must pass\n  string public constant CALLER_NOT_A_VALID_VOTING_PORTAL = '9'; // only an allowed voting portal can queue a proposal\n  string public constant QUEUE_COOLDOWN_PERIOD_NOT_PASSED = '10'; // to execute a proposal a cooldown delay must pass\n  string public constant PROPOSAL_NOT_IN_THE_CORRECT_STATE = '11'; // proposal must be created but not executed yet to be able to be canceled\n  string public constant CALLER_NOT_GOVERNANCE = '12'; // caller must be governance\n  string public constant VOTER_ALREADY_VOTED_ON_PROPOSAL = '13'; // voter can only vote once per proposal using voting portal\n  string public constant WRONG_MESSAGE_ORIGIN = '14'; // received message must come from registered source address, chain id, CrossChainController\n  string public constant NO_VOTING_ASSETS = '15'; // Strategy must have voting assets\n  string public constant PROPOSAL_VOTE_ALREADY_CREATED = '16'; // vote on proposal can only be created once\n  string public constant INVALID_SIGNATURE = '17'; // submitted signature is not valid\n  string public constant PROPOSAL_VOTE_NOT_FINISHED = '18'; // proposal vote must be finished\n  string public constant PROPOSAL_VOTE_NOT_IN_ACTIVE_STATE = '19'; // proposal vote must be in active state\n  string public constant PROPOSAL_VOTE_ALREADY_EXISTS = '20'; // proposal vote already exists\n  string public constant VOTE_ONCE_FOR_ASSET = '21'; // an asset can only be used once per vote\n  string public constant USER_BALANCE_DOES_NOT_EXISTS = '22'; // to vote an user must have balance in the token the user is voting with\n  string public constant USER_VOTING_BALANCE_IS_ZERO = '23'; // to vote an user must have some balance between all the tokens selected for voting\n  string public constant MISSING_AAVE_ROOTS = '24'; // must have AAVE roots registered to use strategy\n  string public constant MISSING_STK_AAVE_ROOTS = '25'; // must have stkAAVE roots registered to use strategy\n  string public constant MISSING_STK_AAVE_SLASHING_EXCHANGE_RATE = '26'; // must have stkAAVE slashing exchange rate registered to use strategy\n  string public constant UNPROCESSED_STORAGE_ROOT = '27'; // root must be registered beforehand\n  string public constant NOT_ENOUGH_MSG_VALUE = '28'; // method was not called with enough value to execute the call\n  string public constant FAILED_ACTION_EXECUTION = '29'; // action failed to execute\n  string public constant SHOULD_BE_AT_LEAST_ONE_EXECUTOR = '30'; // at least one executor is needed\n  string public constant INVALID_EMPTY_TARGETS = '31'; // target of the payload execution must not be empty\n  string public constant EXECUTOR_WAS_NOT_SPECIFIED_FOR_REQUESTED_ACCESS_LEVEL = '32'; // payload executor must be registered for the specified payload access level\n  string public constant PAYLOAD_NOT_IN_QUEUED_STATE = '33'; // payload must be en the queued state\n  string public constant TIMELOCK_NOT_FINISHED = '34'; // delay has not passed before execution can be called\n  string public constant PAYLOAD_NOT_IN_THE_CORRECT_STATE = '35'; // payload must be created but not executed yet to be able to be canceled\n  string public constant PAYLOAD_NOT_IN_CREATED_STATE = '36'; // payload must be in the created state\n  string public constant MISSING_A_AAVE_ROOTS = '37'; // must have aAAVE roots registered to use strategy\n  string public constant MISSING_PROPOSAL_BLOCK_HASH = '38'; // block hash for this proposal was not bridged before\n  string public constant PROPOSAL_VOTE_CONFIGURATION_ALREADY_BRIDGED = '39'; // configuration for this proposal bridged already\n  string public constant INVALID_VOTING_PORTAL_ADDRESS = '40'; // voting portal address can't be 0x0\n  string public constant INVALID_POWER_STRATEGY = '41'; // 0x0 is not valid as the power strategy\n  string public constant INVALID_EXECUTOR_ADDRESS = '42'; // executor address can't be 0x0\n  string public constant EXECUTOR_ALREADY_SET_IN_DIFFERENT_LEVEL = '43'; // executor address already being used as executor of a different level\n  string public constant INVALID_VOTING_DURATION = '44'; // voting duration can not be bigger than the time it takes to execute a proposal\n  string public constant VOTING_DURATION_NOT_PASSED = '45'; // at least votingDuration should have passed since voting started for a proposal to be queued\n  string public constant INVALID_PROPOSAL_ACCESS_LEVEL = '46'; // the bridged proposal access level does not correspond with the maximum access level required by the payload\n  string public constant PAYLOAD_NOT_CREATED_BEFORE_PROPOSAL = '47'; // payload must be created before proposal\n  string public constant INVALID_CROSS_CHAIN_CONTROLLER_ADDRESS = '48';\n  string public constant INVALID_MESSAGE_ORIGINATOR_ADDRESS = '49';\n  string public constant INVALID_ORIGIN_CHAIN_ID = '50';\n  string public constant INVALID_ACTION_TARGET = '51';\n  string public constant INVALID_ACTION_ACCESS_LEVEL = '52';\n  string public constant INVALID_EXECUTOR_ACCESS_LEVEL = '53';\n  string public constant INVALID_VOTING_PORTAL_CROSS_CHAIN_CONTROLLER = '54';\n  string public constant INVALID_VOTING_PORTAL_VOTING_MACHINE = '55';\n  string public constant INVALID_VOTING_PORTAL_GOVERNANCE = '56';\n  string public constant INVALID_VOTING_MACHINE_CHAIN_ID = '57';\n  string public constant G_INVALID_CROSS_CHAIN_CONTROLLER_ADDRESS = '58';\n  string public constant G_INVALID_IPFS_HASH = '59';\n  string public constant G_INVALID_PAYLOAD_ACCESS_LEVEL = '60';\n  string public constant G_INVALID_PAYLOADS_CONTROLLER = '61';\n  string public constant G_INVALID_PAYLOAD_CHAIN = '62';\n  string public constant POWER_STRATEGY_HAS_NO_TOKENS = '63'; // power strategy should at least have\n  string public constant INVALID_VOTING_CONFIG_ACCESS_LEVEL = '64';\n  string public constant VOTING_DURATION_TOO_SMALL = '65';\n  string public constant NO_BRIDGED_VOTING_ASSETS = '66';\n  string public constant INVALID_VOTER = '67';\n  string public constant INVALID_DATA_WAREHOUSE = '68';\n  string public constant INVALID_VOTING_MACHINE_CROSS_CHAIN_CONTROLLER = '69';\n  string public constant INVALID_L1_VOTING_PORTAL = '70';\n  string public constant INVALID_VOTING_PORTAL_CHAIN_ID = '71';\n  string public constant INVALID_VOTING_STRATEGY = '72';\n  string public constant INVALID_VOTE_CONFIGURATION_BLOCKHASH = '73';\n  string public constant INVALID_VOTE_CONFIGURATION_VOTING_DURATION = '74';\n  string public constant INVALID_GAS_LIMIT = '75';\n  string public constant INVALID_VOTING_CONFIGS = '76'; // a lvl2 voting configuration must be sent to initializer\n  string public constant INVALID_EXECUTOR_DELAY = '77';\n  string public constant REPEATED_STRATEGY_ASSET = '78';\n  string public constant EMPTY_ASSET_STORAGE_SLOTS = '79';\n  string public constant REPEATED_STRATEGY_ASSET_SLOT = '80';\n  string public constant INVALID_EXECUTION_TARGET = '81';\n  string public constant MISSING_VOTING_CONFIGURATIONS = '82'; // voting configurations for lvl1 and lvl2 must be included on initialization\n  string public constant INVALID_PROPOSITION_POWER = '83';\n  string public constant INVALID_YES_THRESHOLD = '84';\n  string public constant INVALID_YES_NO_DIFFERENTIAL = '85';\n  string public constant ETH_TRANSFER_FAILED = '86';\n  string public constant INVALID_INITIAL_VOTING_CONFIGS = '87'; // initial voting configurations can not be of the same level\n  string public constant INVALID_VOTING_PORTAL_ADDRESS_IN_VOTING_MACHINE = '88';\n  string public constant INVALID_VOTING_PORTAL_OWNER = '89';\n  string public constant CANCELLATION_FEE_REDEEM_FAILED = '90'; // cancellation fee was not able to be redeemed\n  string public constant INVALID_CANCELLATION_FEE_COLLECTOR = '91'; // collector can not be address 0\n  string public constant INVALID_CANCELLATION_FEE_SENT = '92'; // cancellation fee sent does not match the needed amount\n  string public constant CANCELLATION_FEE_ALREADY_REDEEMED = '93'; // cancellation fee already redeemed\n  string public constant INVALID_STATE_TO_REDEEM_CANCELLATION_FEE = '94'; // proposal state is not a valid state to redeem cancellation fee\n  string public constant MISSING_REPRESENTATION_ROOTS = '95'; // to represent a voter the representation roots need to be registered\n  string public constant CALLER_IS_NOT_VOTER_REPRESENTATIVE = '96'; // to represent a voter, caller must be the stored representative\n  string public constant VM_INVALID_GOVERNANCE_ADDRESS = '97'; // governance address can not be 0\n}\n"
      },
      "lib/aave-helpers/lib/aave-address-book/src/governance-v3/IBaseReceiverPortal.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/**\n * @title IBaseReceiverPortal\n * @author BGD Labs\n * @notice interface defining the method that needs to be implemented by all receiving portals, as its the one that\n           will be called when a received message gets confirmed\n */\ninterface IBaseReceiverPortal {\n  /**\n   * @notice method called by CrossChainController when a message has been confirmed\n   * @param originSender address of the sender of the bridged message\n   * @param originChainId id of the chain where the message originated\n   * @param message bytes bridged containing the desired information\n   */\n  function receiveCrossChainMessage(\n    address originSender,\n    uint256 originChainId,\n    bytes memory message\n  ) external;\n}\n"
      },
      "lib/aave-helpers/lib/aave-address-book/src/governance-v3/IDataWarehouse.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IDataWarehouse {\n  struct SlotValue {\n    bool exists;\n    uint256 value;\n  }\n  /**\n   * @notice event emitted when a storage root has been processed successfully\n   * @param caller address that called the processStorageRoot method\n   * @param account address where the root is generated\n   * @param blockHash hash of the block where the root was generated\n   */\n  event StorageRootProcessed(\n    address indexed caller,\n    address indexed account,\n    bytes32 indexed blockHash\n  );\n\n  /**\n   * @notice event emitted when a storage root has been processed successfully\n   * @param caller address that called the processStorageSlot method\n   * @param account address where the slot is processed\n   * @param blockHash hash of the block where the storage proof was generated\n   * @param slot storage location to search\n   * @param value storage information on the specified location\n   */\n  event StorageSlotProcessed(\n    address indexed caller,\n    address indexed account,\n    bytes32 indexed blockHash,\n    bytes32 slot,\n    uint256 value\n  );\n\n  /**\n   * @notice method to get the storage roots of an account (token) in a certain block hash\n   * @param account address of the token to get the storage roots from\n   * @param blockHash hash of the block from where the roots are generated\n   * @return state root hash of the account on the block hash specified\n   */\n  function getStorageRoots(address account, bytes32 blockHash) external view returns (bytes32);\n\n  /**\n   * @notice method to process the storage root from an account on a block hash.\n   * @param account address of the token to get the storage roots from\n   * @param blockHash hash of the block from where the roots are generated\n   * @param blockHeaderRLP rlp encoded block header. At same block where the block hash was taken\n   * @param accountStateProofRLP rlp encoded account state proof, taken in same block as block hash\n   * @return the storage root\n   */\n  function processStorageRoot(\n    address account,\n    bytes32 blockHash,\n    bytes memory blockHeaderRLP,\n    bytes memory accountStateProofRLP\n  ) external returns (bytes32);\n\n  /**\n   * @notice method to get the storage value at a certain slot and block hash for a certain address\n   * @param account address of the token to get the storage roots from\n   * @param blockHash hash of the block from where the roots are generated\n   * @param slot hash of the explicit storage placement where the value to get is found.\n   * @param storageProof generated proof containing the storage, at block hash\n   * @return an object containing the slot value at the specified storage slot\n   */\n  function getStorage(\n    address account,\n    bytes32 blockHash,\n    bytes32 slot,\n    bytes memory storageProof\n  ) external view returns (SlotValue memory);\n\n  /**\n   * @notice method to register the storage value at a certain slot and block hash for a certain address\n   * @param account address of the token to get the storage roots from\n   * @param blockHash hash of the block from where the roots are generated\n   * @param slot hash of the explicit storage placement where the value to get is found.\n   * @param storageProof generated proof containing the storage, at block hash\n   */\n  function processStorageSlot(\n    address account,\n    bytes32 blockHash,\n    bytes32 slot,\n    bytes calldata storageProof\n  ) external;\n\n  /**\n   * @notice method to get the value from storage at a certain block hash, previously registered.\n   * @param blockHash hash of the block from where the roots are generated\n   * @param account address of the token to get the storage roots from\n   * @param slot hash of the explicit storage placement where the value to get is found.\n   * @return numeric slot value of the slot. The value must be decoded to get the actual stored information\n   */\n  function getRegisteredSlot(\n    bytes32 blockHash,\n    address account,\n    bytes32 slot\n  ) external view returns (uint256);\n}\n"
      },
      "lib/aave-helpers/lib/aave-address-book/src/governance-v3/IExecutor.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IExecutor {\n  /**\n   * @notice emitted when an action got executed\n   * @param target address of the targeted contract\n   * @param value wei value of the transaction\n   * @param signature function signature of the transaction\n   * @param data function arguments of the transaction or callData if signature empty\n   * @param executionTime time at which to execute the transaction\n   * @param withDelegatecall boolean, true = transaction delegatecalls the target, else calls the target\n   * @param resultData the actual callData used on the target\n   **/\n  event ExecutedAction(\n    address indexed target,\n    uint256 value,\n    string signature,\n    bytes data,\n    uint256 executionTime,\n    bool withDelegatecall,\n    bytes resultData\n  );\n\n  /**\n   * @notice Function, called by Governance, that executes a transaction, returns the callData executed\n   * @param target smart contract target\n   * @param value wei value of the transaction\n   * @param signature function signature of the transaction\n   * @param data function arguments of the transaction or callData if signature empty\n   * @param withDelegatecall boolean, true = transaction delegatecalls the target, else calls the target\n   * @return result data of the execution call.\n   **/\n  function executeTransaction(\n    address target,\n    uint256 value,\n    string memory signature,\n    bytes memory data,\n    bool withDelegatecall\n  ) external payable returns (bytes memory);\n}\n"
      },
      "lib/aave-helpers/lib/aave-address-book/src/governance-v3/IGovernanceCore.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {PayloadsControllerUtils} from './PayloadsControllerUtils.sol';\nimport {IVotingMachineWithProofs} from './IVotingMachineWithProofs.sol';\nimport {IGovernancePowerStrategy} from './IGovernancePowerStrategy.sol';\n\ninterface IGovernanceCore {\n  /**\n   * @notice Object with the necessary information of a representative\n   * @param representative address that represents the voter\n   * @param chainId id of the chain where the representative is on\n   */\n  struct RepresentativeInput {\n    address representative;\n    uint256 chainId;\n  }\n\n  /**\n   * @notice Object storing the vote configuration for a specific access level\n   * @param coolDownBeforeVotingStart number of seconds indicating how much time should pass before proposal will be moved to vote\n   * @param votingDuration number of seconds indicating the duration of a vote\n   * @param yesThreshold minimum number of yes votes needed for a proposal to pass.\n            FOR VOTES > YES THRESHOLD\n            we consider that this param in case of AAVE don't need decimal places\n   * @param yesNoDifferential number of for votes that need to be bigger than against votes to pass a proposal.\n            FOR VOTES - AGAINST VOTES > YES NO DIFFERENTIAL\n            we consider that this param in case of AAVE don't need decimal places\n   * @param minPropositionPower the minimum needed power to create a proposal.\n            we consider that this param in case of AAVE don't need decimal places\n   */\n  struct VotingConfig {\n    uint24 coolDownBeforeVotingStart;\n    uint24 votingDuration;\n    uint56 yesThreshold;\n    uint56 yesNoDifferential;\n    uint56 minPropositionPower;\n  }\n\n  /**\n   * @notice object storing the input parameters of a voting configuration\n   * @param accessLevel number of access level needed to execute a proposal in this settings\n   * @param coolDownBeforeVotingStart number of seconds indicating the time that must pass from proposal creation for\n            the voting to be activated\n   * @param votingDuration number of seconds indicating the duration of a vote\n   * @param yesThreshold minimum number of yes votes needed for a proposal to pass.\n            FOR VOTES > YES THRESHOLD\n            in normal units with 18 decimals\n   * @param yesNoDifferential number of for votes that need to be bigger than against votes to pass a proposal.\n            FOR VOTES - AGAINST VOTES > YES NO DIFFERENTIAL\n            in normal units with 18 decimals\n   * @param minPropositionPower the minimum needed power to create a proposal.\n            in normal units with 18 decimals\n   */\n  struct SetVotingConfigInput {\n    PayloadsControllerUtils.AccessControl accessLevel;\n    uint24 coolDownBeforeVotingStart;\n    uint24 votingDuration;\n    uint256 yesThreshold;\n    uint256 yesNoDifferential;\n    uint256 minPropositionPower;\n  }\n\n  /**\n   * @notice enum storing the different states of a proposal\n   * @dev State enum defines the state machine of a proposal so the order on which the state is defined is important.\n          Check logic correctness if new states are added / removed\n   */\n  enum State {\n    Null, // proposal does not exists\n    Created, // created, waiting for a cooldown to initiate the balances snapshot\n    Active, // balances snapshot set, voting in progress\n    Queued, // voting results submitted, but proposal is under grace period when guardian can cancel it\n    Executed, // results sent to the execution chain(s)\n    Failed, // voting was not successful\n    Cancelled, // got cancelled by guardian, or because proposition power of creator dropped below allowed minimum\n    Expired\n  }\n\n  /**\n   * @notice object storing all the information of a proposal including the different states in time that can have\n   * @param state current state of the proposal\n   * @param accessLevel minimum level needed to be able to execute this proposal\n   * @param votingDuration number of seconds indicating the duration of a vote. max is: 16'777'216 (ie 194.18 days)\n   * @param creationTime timestamp in seconds of when the proposal was created. max is: 1.099511628×10¹² (ie 34'865 years)\n   * @param votingActivationTime timestamp in seconds of when the voting activates for the proposal\n   * @param queuingTime timestamp in seconds of when the proposal was queued\n   * @param cancelTimestamp timestamp in seconds of when the proposal was canceled\n   * @param creator address of the creator of the proposal\n   * @param votingPortal address of the votingPortal used to communicate with the voting chain\n   * @param snapshotBlockHash block hash of when the proposal was created, as to be able to get the correct balances on this specific block\n   * @param ipfsHash ipfs has containing the proposal metadata information\n   * @param forVotes number of votes in favor of the proposal\n   * @param againstVotes number of votes against the proposal\n   * @param cancellationFee amount in eth that will be retained if proposal is cancelled\n   * @param payloads list of objects containing the payload information necessary for execution\n   */\n  struct Proposal {\n    State state;\n    PayloadsControllerUtils.AccessControl accessLevel;\n    uint40 creationTime;\n    uint24 votingDuration;\n    uint40 votingActivationTime;\n    uint40 queuingTime;\n    uint40 cancelTimestamp;\n    address creator;\n    address votingPortal;\n    bytes32 snapshotBlockHash;\n    bytes32 ipfsHash;\n    uint128 forVotes;\n    uint128 againstVotes;\n    uint256 cancellationFee;\n    PayloadsControllerUtils.Payload[] payloads;\n  }\n\n  /**\n   * @notice emitted when powerStrategy got updated\n   * @param newPowerStrategy address of the new powerStrategy\n   */\n  event PowerStrategyUpdated(address indexed newPowerStrategy);\n\n  /**\n   * @notice emitted when one of the _votingConfigs got updated\n   * @param accessLevel minimum level needed to be able to execute this proposal\n   * @param votingDuration duration of the voting period in seconds\n   * @param coolDownBeforeVotingStart time in seconds between proposal creation and voting activation\n   * @param yesThreshold min amount of yes votes needed to pass a proposal\n   * @param yesNoDifferential minimal difference between you and no votes for proposal to pass\n   * @param minPropositionPower minimal proposition power of a user to be able to create proposal\n   */\n  event VotingConfigUpdated(\n    PayloadsControllerUtils.AccessControl indexed accessLevel,\n    uint24 votingDuration,\n    uint24 coolDownBeforeVotingStart,\n    uint256 yesThreshold,\n    uint256 yesNoDifferential,\n    uint256 minPropositionPower\n  );\n\n  /**\n   * @notice emitted when a proposal is created.\n   * @param proposalId id of the proposal\n   * @param creator address of the creator of the proposal\n   * @param accessLevel minimum level needed to be able to execute this proposal\n   * @param ipfsHash ipfs has containing the proposal metadata information\n   */\n  event ProposalCreated(\n    uint256 indexed proposalId,\n    address indexed creator,\n    PayloadsControllerUtils.AccessControl indexed accessLevel,\n    bytes32 ipfsHash\n  );\n  /**\n   * @notice emitted when voting is activated. Meaning that the vote configuration will be sent to voting machine\n   * @param proposalId id of the proposal\n   * @param snapshotBlockHash block hash of when the proposal was created, as to be able to get the correct balances on this specific block\n   * @param votingDuration duration of the voting period in seconds\n   */\n  event VotingActivated(\n    uint256 indexed proposalId,\n    bytes32 indexed snapshotBlockHash,\n    uint24 votingDuration\n  );\n\n  /**\n   * @notice emitted when proposal change state to Queued\n   * @param proposalId id of the proposal\n   * @param votesFor votes for proposal\n   * @param votesAgainst votes against proposal\n   */\n  event ProposalQueued(uint256 indexed proposalId, uint128 votesFor, uint128 votesAgainst);\n\n  /**\n   * @notice emitted when proposal change state to Executed\n   * @param proposalId id of the proposal\n   */\n  event ProposalExecuted(uint256 indexed proposalId);\n\n  /**\n   * @notice emitted when proposal change state to Canceled\n   * @param proposalId id of the proposal\n   */\n  event ProposalCanceled(uint256 indexed proposalId);\n\n  /**\n   * @notice emitted when proposal change state to Failed\n   * @param proposalId id of the proposal\n   * @param votesFor votes for proposal\n   * @param votesAgainst votes against proposal\n   */\n  event ProposalFailed(uint256 indexed proposalId, uint128 votesFor, uint128 votesAgainst);\n\n  /**\n   * @notice emitted when a voting machine gets updated\n   * @param votingPortal address of the voting portal updated\n   * @param approved boolean indicating if a voting portal has been added or removed\n   */\n  event VotingPortalUpdated(address indexed votingPortal, bool indexed approved);\n\n  /**\n   * @notice emitted when a payload is successfully sent to the execution chain\n   * @param proposalId id of the proposal containing the payload sent for execution\n   * @param payloadId id of the payload sent for execution\n   * @param payloadsController address of the payloads controller on the execution chain\n   * @param chainId id of the execution chain\n   * @param payloadNumberOnProposal number of payload sent for execution, from the number of payloads contained in proposal\n   * @param numberOfPayloadsOnProposal number of payloads that are in the proposal\n   */\n  event PayloadSent(\n    uint256 indexed proposalId,\n    uint40 payloadId,\n    address indexed payloadsController,\n    uint256 indexed chainId,\n    uint256 payloadNumberOnProposal,\n    uint256 numberOfPayloadsOnProposal\n  );\n\n  /**\n   * @notice emitted when a vote is successfully sent to voting chain\n   * @param proposalId id of the proposal the vote is for\n   * @param voter address that wants to vote on a proposal\n   * @param support indicates if vote is in favor or against the proposal\n   * @param votingAssetsWithSlot list of token addresses with the base storage slot to use for the vote\n   */\n  event VoteForwarded(\n    uint256 indexed proposalId,\n    address indexed voter,\n    bool indexed support,\n    IVotingMachineWithProofs.VotingAssetWithSlot[] votingAssetsWithSlot\n  );\n\n  /**\n   * @notice emitted when the cancellation fee is updated\n   * @param cancellationFee amount of the new cancellation fee\n   */\n  event CancellationFeeUpdated(uint256 cancellationFee);\n\n  /**\n   * @notice emitted when the cancellation fee is redeemed\n   * @param proposalId id of the proposal the fee was redeemed from\n   * @param to address that will receive the cancellation fee\n   * @param cancellationFee amount of the cancellation fee redeemed\n   * @param success flag indicating if the transfer was successful or not\n   */\n  event CancellationFeeRedeemed(\n    uint256 indexed proposalId,\n    address indexed to,\n    uint256 cancellationFee,\n    bool indexed success\n  );\n\n  /**\n   * @notice method to get the Cancellation Fee Collector address\n   * @return cancellation fee collector address\n   */\n  function CANCELLATION_FEE_COLLECTOR() external view returns (address);\n\n  /**\n   * @notice method to update the cancellation fee\n   * @param cancellationFee the fee amount to collateralize against a proposal cancellation\n   */\n  function updateCancellationFee(uint256 cancellationFee) external;\n\n  /**\n   * @notice method to get the cancellation fee\n   * @return cancellation fee amount\n   */\n  function getCancellationFee() external view returns (uint256);\n\n  /**\n   * @notice method to redeem the cancellation fee from a proposal\n   * @param proposalIds array of ids of the proposals to redeem the cancellation fee from\n   */\n  function redeemCancellationFee(uint256[] calldata proposalIds) external;\n\n  /**\n   * @notice emitted when a voter updates its representative\n   * @param voter address of the voter that updates\n   * @param representative address of the chosen representative\n   * @param chainId id of the chain where representative is representing the voter on\n   */\n  event RepresentativeUpdated(\n    address indexed voter,\n    address indexed representative,\n    uint256 indexed chainId\n  );\n\n  /**\n   * @notice method to get the number of registered voting portals\n   * @return number of registered voting portals\n   */\n  function getVotingPortalsCount() external view returns (uint256);\n\n  /**\n   * @notice method to approve new voting machines\n   * @param votingPortals array of voting portal addresses to approve\n   */\n  function addVotingPortals(address[] calldata votingPortals) external;\n\n  /**\n   * @notice method to add a new voting portal\n   * @param votingPortal address of the new voting portal\n   * @dev This method is only callable by the Guardian.\n   * @dev This method is only callable when there are no voting portals registered. Its rationale is for the Guardian\n          to be able to \"rescue\" the system in case all voting portals were removed by mistake. This is needed because\n          to add a new voting portal a full governance flow is required, and without the portal, the system would be bricked.\n          To limit the Guardian's power, can only happen if there are no voting portals registered, and the guardian\n          could only add one voting portal.\n   */\n  function rescueVotingPortal(address votingPortal) external;\n\n  /**\n   * @notice method to remove an accepted voting portal.\n   * @param votingPortals list of addresses of the voting machines that are no longer valid\n   * @dev removing a voting portal effectively removes a voting machine\n   */\n  function removeVotingPortals(address[] calldata votingPortals) external;\n\n  /**\n   * @notice creates a proposal, with configuration specified in VotingConfig corresponding to the accessLevel\n   * @param payloads which user propose to vote for\n   * @param votingPortal address of the contract which will bootstrap voting, and provide results in the end\n   * @param ipfsHash ipfs hash of a document with proposal description\n   * @return created proposal ID\n   */\n  function createProposal(\n    PayloadsControllerUtils.Payload[] calldata payloads,\n    address votingPortal,\n    bytes32 ipfsHash\n  ) external payable returns (uint256);\n\n  /**\n   * @notice executes a proposal, can be called by anyone if proposal in Queued state\n   * @notice and passed more then COOLDOWN_PERIOD seconds after proposal entered this state\n   * @param proposalId id of the proposal\n   */\n  function executeProposal(uint256 proposalId) external;\n\n  /**\n   * @notice cancels a proposal, can be initiated by guardian,\n   * @notice or if proposition power of proposal creator will go below minPropositionPower specified in VotingConfig\n   * @param proposalId id of the proposal\n   */\n  function cancelProposal(uint256 proposalId) external;\n\n  /**\n   * @notice gets the state of a proposal\n   * @param proposalId id of the proposal\n   * @return state of the proposal\n   */\n  function getProposalState(uint256 proposalId) external view returns (State);\n\n  /**\n   * @notice method to set a new powerStrategy contract\n   * @param newPowerStrategy address of the new contract containing the voting a voting strategy\n   */\n\n  function setPowerStrategy(IGovernancePowerStrategy newPowerStrategy) external;\n\n  /**\n   * @notice method to set the voting configuration for a determined access level\n   * @param votingConfigs object containing configuration for an access level\n   */\n  function setVotingConfigs(SetVotingConfigInput[] calldata votingConfigs) external;\n\n  /**\n   * @notice method to get the voting configuration from an access level\n   * @param accessLevel level for which to get the configuration of a vote\n   * @return the voting configuration assigned to the specified accessLevel\n   */\n  function getVotingConfig(\n    PayloadsControllerUtils.AccessControl accessLevel\n  ) external view returns (VotingConfig memory);\n\n  /**\n   * @notice method to get the reasonably achievable voting participation, taking into total supply, and market situation\n   * @return maximum voting participation in wei\n   */\n  function ACHIEVABLE_VOTING_PARTICIPATION() external view returns (uint256);\n\n  /**\n   * @notice method to get the cool down period between queuing and execution\n   * @return time in seconds\n   */\n  function COOLDOWN_PERIOD() external view returns (uint256);\n\n  /**\n   * @notice method to get the minimum voting duration time in seconds\n   * @return time in seconds\n   */\n  function MIN_VOTING_DURATION() external view returns (uint256);\n\n  /**\n   * @notice method to get the precision divider used to remove unneeded decimals\n   * @return decimals of 1 ether (18)\n   */\n  function PRECISION_DIVIDER() external view returns (uint256);\n\n  /**\n   * @notice method to get the the voting tokens cap\n   * @return cap for the voting tokens\n   * @dev This cap is used to limit the number of voting tokens, so as to not drain the bridging funds\n          with a message too big.\n   */\n  function VOTING_TOKENS_CAP() external view returns (uint256);\n\n  /**\n   * @notice method to get the expiration time from creation from which the proposal will be invalid\n   * @return time in seconds\n   */\n  function PROPOSAL_EXPIRATION_TIME() external view returns (uint256);\n\n  /**\n   * @notice method to get the name of the contract\n   * @return name string\n   */\n  function NAME() external view returns (string memory);\n\n  /**\n   * @notice method to get the proposal identified by passed id\n   * @param proposalId id of the proposal to get the information of\n   * @return proposal object containing all the information\n   */\n  function getProposal(uint256 proposalId) external view returns (Proposal memory);\n\n  /**\n   * @notice address of the current voting strategy to use on the governance\n   * @return address of the voting strategy\n   */\n  function getPowerStrategy() external view returns (IGovernancePowerStrategy);\n\n  /**\n   * @notice proposals counter.\n   * @return the current number proposals created\n   */\n  function getProposalsCount() external view returns (uint256);\n\n  /**\n   * @notice method to get if a voting portal is approved by the governance\n   * @param votingPortal address of the voting portal to check if approved\n   * @return flag indicating the approval status of the voting portal\n   */\n  function isVotingPortalApproved(address votingPortal) external view returns (bool);\n\n  /**\n   * @notice method to queue a proposal for execution\n   * @param proposalId the id of the proposal to queue\n   * @param forVotes number of votes in favor of the proposal\n   * @param againstVotes number of votes against of the proposal\n   */\n  function queueProposal(uint256 proposalId, uint128 forVotes, uint128 againstVotes) external;\n\n  /**\n   * @notice method to send proposal to votingMachine\n   * @param proposalId id of the proposal to start the voting on\n   */\n  function activateVoting(uint256 proposalId) external;\n\n  /**\n   * @notice method to get the representative of a voter on a chain\n   * @param voter address of the voter\n   * @param chainId id of the chain to get the representative from\n   * @return address of the representative of the voter on chainId\n   */\n  function getRepresentativeByChain(address voter, uint256 chainId) external view returns (address);\n\n  /**\n   * @notice method to update the representative of a voter on certain chain.\n   * @param representatives Array of objects with the representative information\n   */\n  function updateRepresentativesForChain(RepresentativeInput[] calldata representatives) external;\n\n  /**\n   * @notice method to get the voters a representative is representing\n   * @param representative address of the representative\n   * @param chainId id of the chain to search for represented voters\n   */\n  function getRepresentedVotersByChain(\n    address representative,\n    uint256 chainId\n  ) external view returns (address[] memory);\n}\n"
      },
      "lib/aave-helpers/lib/aave-address-book/src/governance-v3/IGovernancePowerStrategy.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IGovernancePowerStrategy {\n  /**\n * @notice method to get the full voting power of an user. This method is only use for consulting purposes.\n             As its not used for voting calculations, it is not needed to force blockNumber - 1 to protect against\n             FlashLoan attacks.\n   * @param user address where we want to get the power from\n   * @return full voting power of a user\n   */\n  function getFullVotingPower(address user) external view returns (uint256);\n\n  /**\n   * @notice method to get the full proposal power of an user. It is not needed to protect against FlashLoan\n             attacks because once user returns the tokens (power) the proposal will get canceled as proposal creator\n             will loose the proposition power.\n   * @param user address where we want to get the power from\n   * @return full proposition power of a user\n   */\n  function getFullPropositionPower(address user) external view returns (uint256);\n}\n"
      },
      "lib/aave-helpers/lib/aave-address-book/src/governance-v3/IPayloadsControllerCore.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {PayloadsControllerUtils} from './PayloadsControllerUtils.sol';\n\ninterface IPayloadsControllerCore {\n  /// @notice Enum indicating the possible payload states\n  enum PayloadState {\n    None, // state 0 left as empty\n    Created,\n    Queued,\n    Executed,\n    Cancelled,\n    Expired\n  }\n\n  /**\n   * @notice holds configuration of the executor\n   * @param executor address of the executor\n   * @param delay time in seconds between queuing and execution\n   */\n  struct ExecutorConfig {\n    address executor;\n    uint40 delay;\n  }\n\n  /**\n   * @notice Object containing the information necessary to set a new executor\n   * @param accessLevel level of access that the executor will be assigned to\n   * @param executorConfig object containing the configurations for the accessLevel specified\n   */\n  struct UpdateExecutorInput {\n    PayloadsControllerUtils.AccessControl accessLevel;\n    ExecutorConfig executorConfig;\n  }\n\n  /**\n   * @notice Object containing the information necessary to define a payload action\n   * @param target address of the contract that needs to be executed\n   * @param withDelegateCall boolean indicating if execution needs to be delegated\n   * @param accessLevel access level of the executor needed for the execution\n   * @param value value amount that needs to be sent to the executeTransaction method\n   * @param signature method signature that will be executed\n   * @param callData data needed for the execution of the signature\n   */\n  struct ExecutionAction {\n    address target;\n    bool withDelegateCall;\n    PayloadsControllerUtils.AccessControl accessLevel;\n    uint256 value;\n    string signature;\n    bytes callData;\n  }\n\n  /**\n   * @notice Object containing a payload information\n   * @param creator address of the createPayload method caller\n   * @param maximumAccessLevelRequired min level needed to be able to execute all actions\n   * @param state indicates the current state of the payload\n   * @param createdAt time indicating when payload has been created. In seconds // max is: 1.099511628×10¹² (ie 34'865 years)\n   * @param queuedAt time indicating when payload has been queued. In seconds  // max is: 1.099511628×10¹² (ie 34'865 years)\n   * @param executedAt time indicating when a payload has been executed. In seconds  // max is: 1.099511628×10¹² (ie 34'865 years)\n   * @param cancelledAt time indicating when the payload has been cancelled. In seconds\n   * @param expirationTime time indicating when the Payload will expire\n   * @param delay time in seconds that a payload must remain queued before execution\n   * @param gracePeriod time in seconds that a payload has to be executed\n   * @param actions array of actions to be executed\n   */\n  struct Payload {\n    address creator;\n    PayloadsControllerUtils.AccessControl maximumAccessLevelRequired;\n    PayloadState state;\n    uint40 createdAt;\n    uint40 queuedAt;\n    uint40 executedAt;\n    uint40 cancelledAt;\n    uint40 expirationTime;\n    uint40 delay;\n    uint40 gracePeriod;\n    ExecutionAction[] actions;\n  }\n\n  /**\n   * @notice Event emitted when an executor has been set for a determined access level\n   * @param accessLevel level of access that the executor will be set to\n   * @param executor address that will be set for the determined access level\n   * @param delay time in seconds between queuing and execution\n   */\n  event ExecutorSet(\n    PayloadsControllerUtils.AccessControl indexed accessLevel,\n    address indexed executor,\n    uint40 delay\n  );\n\n  /**\n   * @notice Event emitted when a payload has been created\n   * @param payloadId id of the payload created\n   * @param creator address pertaining to the caller of the method createPayload\n   * @param actions array of the actions conforming the payload\n   * @param maximumAccessLevelRequired maximum level of the access control\n   */\n  event PayloadCreated(\n    uint40 indexed payloadId,\n    address indexed creator,\n    ExecutionAction[] actions,\n    PayloadsControllerUtils.AccessControl indexed maximumAccessLevelRequired\n  );\n\n  /**\n   * @notice emitted when a cross chain message gets received\n   * @param originSender address that sent the message on the origin chain\n   * @param originChainId id of the chain where the message originated\n   * @param delivered flag indicating if message has been delivered\n   * @param message bytes containing the necessary information to queue the bridged payload id\n   * @param reason bytes with the revert information\n   */\n  event PayloadExecutionMessageReceived(\n    address indexed originSender,\n    uint256 indexed originChainId,\n    bool indexed delivered,\n    bytes message,\n    bytes reason\n  );\n\n  /**\n   * @notice Event emitted when a payload has been executed\n   * @param payloadId id of the payload being enqueued\n   */\n  event PayloadExecuted(uint40 payloadId);\n\n  /**\n   * @notice Event emitted when a payload has been queued\n   * @param payloadId id of the payload being enqueued\n   */\n  event PayloadQueued(uint40 payloadId);\n\n  /**\n   * @notice Event emitted when cancelling a payload\n   * @param payloadId id of the cancelled payload\n   */\n  event PayloadCancelled(uint40 payloadId);\n\n  /**\n   * @notice get the expiration delay of a payload\n   * @return expiration delay in seconds\n   */\n  function EXPIRATION_DELAY() external view returns (uint40);\n\n  /**\n   * @notice get the maximum time in seconds that a proposal must spend being queued\n   * @return max delay in seconds\n   */\n  function MAX_EXECUTION_DELAY() external view returns (uint40);\n\n  /**\n   * @notice get the minimum time in seconds that a proposal must spend being queued\n   * @return min delay in seconds\n   */\n  function MIN_EXECUTION_DELAY() external view returns (uint40);\n\n  /**\n   * @notice time in seconds where the proposal can be executed (from executionTime) before it expires\n   * @return grace period in seconds\n   */\n  function GRACE_PERIOD() external view returns (uint40);\n\n  /**\n   * @notice get a previously created payload object\n   * @param payloadId id of the payload to retrieve\n   * @return payload information\n   */\n  function getPayloadById(uint40 payloadId) external view returns (Payload memory);\n\n  /**\n   * @notice get the current state of a payload\n   * @param payloadId id of the payload to retrieve the state from\n   * @return payload state\n   */\n  function getPayloadState(uint40 payloadId) external view returns (PayloadState);\n\n  /**\n   * @notice get the total count of payloads created\n   * @return number of payloads\n   */\n  function getPayloadsCount() external view returns (uint40);\n\n  /**\n   * @notice method that will create a Payload object for every action sent\n   * @param actions array of actions which this proposal payload will contain\n   * @return id of the created payload\n   */\n  function createPayload(ExecutionAction[] calldata actions) external returns (uint40);\n\n  /**\n   * @notice method to execute a payload\n   * @param payloadId id of the payload that needs to be executed\n   */\n  function executePayload(uint40 payloadId) external payable;\n\n  /**\n   * @notice method to cancel a payload\n   * @param payloadId id of the payload that needs to be canceled\n   */\n  function cancelPayload(uint40 payloadId) external;\n\n  /**\n   * @notice method to add executors and its configuration\n   * @param executors array of UpdateExecutorInput objects\n   */\n  function updateExecutors(UpdateExecutorInput[] calldata executors) external;\n\n  /**\n   * @notice method to get the executor configuration assigned to the specified level\n   * @param accessControl level of which we want to get the executor configuration from\n   * @return executor configuration\n   */\n  function getExecutorSettingsByAccessControl(\n    PayloadsControllerUtils.AccessControl accessControl\n  ) external view returns (ExecutorConfig memory);\n}\n"
      },
      "lib/aave-helpers/lib/aave-address-book/src/governance-v3/IVotingMachineWithProofs.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IDataWarehouse} from './IDataWarehouse.sol';\nimport {IVotingStrategy} from './IVotingStrategy.sol';\n\ninterface IVotingMachineWithProofs {\n  /**\n   * @notice Object containing the signature parameters to be able to vote as a representative\n   * @param v v part of the voter signature\n   * @param r r part of the voter signature\n   * @param s s part of the voter signature\n   */\n  struct SignatureParams {\n    uint8 v;\n    bytes32 r;\n    bytes32 s;\n  }\n\n  /**\n   * @notice Object to use over submitVoteBySignature and in case of bridging for protect against wrong roots inclusion\n   * @param underlyingAsset address of the token on L1, used for voting\n   * @param slot base storage position where the balance on underlyingAsset contract resides on L1. (Normally position 0)\n   */\n  struct VotingAssetWithSlot {\n    address underlyingAsset;\n    uint128 slot;\n  }\n\n  /**\n   * @notice object containing the information of a bridged vote\n   * @param support indicates if vote is in favor or against the proposal\n   * @param votingAssetsWithSlots list of token addresses with storage slots, that the voter will use for voting\n   */\n  struct BridgedVote {\n    bool support;\n    VotingAssetWithSlot[] votingAssetsWithSlot;\n  }\n\n  /**\n   * @notice enum delimiting the possible states a proposal can have on the voting machine\n   * @dev ProposalState enum defines the state machine of a proposal being voted, so the order on which the state is\n          defined is important. Check logic correctness if new states are added / removed\n   */\n  enum ProposalState {\n    NotCreated,\n    Active,\n    Finished,\n    SentToGovernance\n  }\n\n  /**\n   * @notice Object with vote information\n   * @param support boolean indicating if the vote is in favor or against a proposal\n   * @param votingPower the power used for voting\n   */\n  struct Vote {\n    bool support;\n    uint248 votingPower;\n  }\n\n  /**\n   * @notice Object containing a proposal information\n   * @param id numeric identification of the proposal\n   * @param sentToGovernance boolean indication if the proposal results have been sent back to L1 governance\n   * @param startTime timestamp of the start of voting on the proposal\n   * @param endTime timestamp when the voting on the proposal finishes (startTime + votingDuration)\n   * @param votingClosedAndSentTimestamp timestamp indicating when the vote has been closed and sent to governance chain\n   * @param forVotes votes cast in favor of the proposal\n   * @param againstVotes votes cast against the proposal\n   * @param creationBlockNumber blockNumber from when the proposal has been created in votingMachine\n   * @param votingClosedAndSentBlockNumber block from when the vote has been closed and sent to governance chain\n   * @param votes mapping indication for every voter of the proposal the information of that vote\n   */\n  struct Proposal {\n    uint256 id;\n    bool sentToGovernance;\n    uint40 startTime;\n    uint40 endTime;\n    uint40 votingClosedAndSentTimestamp;\n    uint128 forVotes;\n    uint128 againstVotes;\n    uint256 creationBlockNumber;\n    uint256 votingClosedAndSentBlockNumber;\n    mapping(address => Vote) votes;\n  }\n\n  /**\n   * @notice Object containing a proposal information\n   * @param id numeric identification of the proposal\n   * @param sentToGovernance boolean indication if the proposal results have been sent back to L1 governance\n   * @param startTime timestamp of the start of voting on the proposal\n   * @param endTime timestamp when the voting on the proposal finishes (startTime + votingDuration)\n   * @param votingClosedAndSentTimestamp timestamp indicating when the vote has been closed and sent to governance chain\n   * @param forVotes votes cast in favor of the proposal\n   * @param againstVotes votes cast against the proposal\n   * @param creationBlockNumber blockNumber from when the proposal has been created in votingMachine\n   * @param votingClosedAndSentBlockNumber block from when the vote has been closed and sent back to governance chain\n   */\n  struct ProposalWithoutVotes {\n    uint256 id;\n    bool sentToGovernance;\n    uint40 startTime;\n    uint40 endTime;\n    uint40 votingClosedAndSentTimestamp;\n    uint128 forVotes;\n    uint128 againstVotes;\n    uint256 creationBlockNumber;\n    uint256 votingClosedAndSentBlockNumber;\n  }\n\n  /**\n   * @notice vote configuration passed from l1\n   * @param votingDuration duration in seconds of the vote for a proposal\n   * @param l1BlockHash hash of the block on L1 from the block when the proposal was activated for voting (sent to voting machine)\n            this block hash is used to delimit from when the voting power is accounted for voting\n   */\n  struct ProposalVoteConfiguration {\n    uint24 votingDuration;\n    bytes32 l1ProposalBlockHash;\n  }\n\n  /**\n   * @notice Object with the necessary information to process a vote\n   * @param underlyingAsset address of the token on L1, used for voting\n   * @param slot base storage position where the balance on underlyingAsset contract resides on L1. (Normally position 0)\n   * @param proof bytes of the generated proof on L1 with the slot information of underlying asset.\n   */\n  struct VotingBalanceProof {\n    address underlyingAsset;\n    uint128 slot;\n    bytes proof;\n  }\n\n  /**\n   * @notice emitted when a proposal is created\n   * @param proposalId numeric id of the created proposal\n   * @param l1BlockHash block hash from the block on l1 from when the proposal was activated for voting\n   * @param startTime timestamp when the proposal was created and ready for voting\n   * @param endTime timestamp of when the voting period ends. (startTime + votingDuration)\n   */\n  event ProposalVoteStarted(\n    uint256 indexed proposalId,\n    bytes32 indexed l1BlockHash,\n    uint256 startTime,\n    uint256 endTime\n  );\n\n  /**\n   * @notice emitted when the results of a vote on a proposal are sent to L1\n   * @param proposalId numeric id of the proposal which results are sent to L1\n   * @param forVotes votes cast in favor of proposal\n   * @param againstVotes votes cast against the proposal\n   */\n  event ProposalResultsSent(uint256 indexed proposalId, uint256 forVotes, uint256 againstVotes);\n\n  /**\n   * @notice emitted when a vote is registered\n   * @param proposalId Id of the proposal\n   * @param voter address of the voter\n   * @param support boolean, true = vote for, false = vote against\n   * @param votingPower Power of the voter/vote\n   */\n  event VoteEmitted(\n    uint256 indexed proposalId,\n    address indexed voter,\n    bool indexed support,\n    uint256 votingPower\n  );\n\n  /**\n   * @notice emitted when a voting configuration of a proposal gets received. Meaning that has been bridged successfully\n   * @param proposalId id of the proposal bridged to start the vote on\n   * @param blockHash hash of the block on L1 when the proposal was activated for voting\n   * @param votingDuration duration in seconds of the vote\n   * @param voteCreated boolean indicating if the vote has been created or not.\n   * @dev the vote will only be created automatically if when the configuration is bridged, all necessary roots\n          have been registered already.\n   */\n  event ProposalVoteConfigurationBridged(\n    uint256 indexed proposalId,\n    bytes32 indexed blockHash,\n    uint24 votingDuration,\n    bool indexed voteCreated\n  );\n\n  /**\n   * @notice method to get the representatives mapping slot in Governance contract\n   * @return representatives slot\n   */\n  function REPRESENTATIVES_SLOT() external view returns (uint256);\n\n  /**\n   * @notice method to get the Governance contract address\n   * @return Governance address\n   */\n  function GOVERNANCE() external view returns (address);\n\n  /**\n   * @notice method to get the voting asset with slot signature\n   * @return signature of the voting asset with slot method\n   */\n  function VOTING_ASSET_WITH_SLOT_RAW() external view returns (string memory);\n\n  /**\n   * @notice method to get the DataWarehouse contract\n   * @return DataWarehouse contract\n   */\n  function DATA_WAREHOUSE() external view returns (IDataWarehouse);\n\n  /**\n   * @notice method to get the VotingStrategy contract\n   * @return VotingStrategy contract\n   */\n  function VOTING_STRATEGY() external view returns (IVotingStrategy);\n\n  /**\n   * @notice Get the v4 compatible domain separator\n   * @dev Return cached value if chainId matches cache, otherwise recomputes separator\n   * @return The domain separator of the token at current chain\n   */\n  function DOMAIN_SEPARATOR() external view returns (bytes32);\n\n  /**\n   * @notice method to get the vote submitted type hash for permits digest\n   * @return hash of vote submitted string\n   */\n  function VOTE_SUBMITTED_TYPEHASH() external view returns (bytes32);\n\n  /**\n   * @notice method to get the vote submitted by representative type hash for permits digest\n   * @return hash of vote submitted by representative string\n   */\n  function VOTE_SUBMITTED_BY_REPRESENTATIVE_TYPEHASH() external view returns (bytes32);\n\n  /**\n   * @notice method to get the voting asset with slot type hash for permits digest\n   * @return hash of vote submitted string\n   */\n  function VOTING_ASSET_WITH_SLOT_TYPEHASH() external view returns (bytes32);\n\n  /**\n   * @notice method to get the contract name for permits digest\n   * @return contract name string\n   */\n  function NAME() external view returns (string memory);\n\n  /**\n   * @notice method to get a proposal information specified by its id\n   * @param proposalId id of the proposal to retrieve\n   * @return the proposal information without the users vote\n   */\n  function getProposalById(uint256 proposalId) external view returns (ProposalWithoutVotes memory);\n\n  /**\n   * @notice method to get the state of a proposal specified by its id\n   * @param proposalId id of the proposal to retrieve the state of\n   * @return the state of the proposal\n   */\n  function getProposalState(uint256 proposalId) external view returns (ProposalState);\n\n  /**\n   * @notice method to get the voting configuration of a proposal specified by its id\n   * @param proposalId id of the proposal to retrieve the voting configuration from\n   * @return the proposal vote configuration object\n   */\n  function getProposalVoteConfiguration(\n    uint256 proposalId\n  ) external view returns (ProposalVoteConfiguration memory);\n\n  /**\n  * @notice method to get a paginated list of proposalIds. The proposals are taken from a list of proposals that have\n            received vote configuration from governance chain\n  * @param skip number of proposal ids to skip. from latest in the list of proposal ids with voting configuration\n  * @param size length of proposal ids to ask for.\n  * @return list of proposal ids\n  * @dev This is mainly used to get a list of proposals that require automation in some step of the proposal live cycle.\n  */\n  function getProposalsVoteConfigurationIds(\n    uint256 skip,\n    uint256 size\n  ) external view returns (uint256[] memory);\n\n  /**\n   * @notice method to get the vote set by a user on a proposal specified by its id\n   * @param user address of the user that voted\n   * @param proposalId id of the proposal to retrieve the vote from\n   * @return the vote (support and voting power) emitted\n   */\n  function getUserProposalVote(\n    address user,\n    uint256 proposalId\n  ) external view returns (Vote memory);\n\n  /**\n    * @notice method to start a vote on a proposal specified by its id.\n    * @param proposalId id of the proposal to start the vote on.\n    * @return the id of the proposal that had the vote started on.\n    * @dev this method can be called by anyone, requiring that the appropriate conditions are met.\n           basically that the proper roots have been registered.\n           It can also be called internally when the bridged message is received and the the required roots\n           have been registered\n    */\n  function startProposalVote(uint256 proposalId) external returns (uint256);\n\n  /**\n    * @notice method to cast a vote on a proposal specified by its id\n    * @param proposalId id of the proposal on which the vote will be cast\n    * @param support boolean indicating if the vote is in favor or against the proposal\n    * @param votingBalanceProofs list of objects containing the information necessary to vote using the tokens\n             allowed on the voting strategy.\n    * @dev A vote does not need to use all the tokens allowed, can be a subset\n    */\n  function submitVote(\n    uint256 proposalId,\n    bool support,\n    VotingBalanceProof[] calldata votingBalanceProofs\n  ) external;\n\n  /**\n   * @notice Function to register the vote of user that has voted offchain via signature\n   * @param proposalId id of the proposal\n   * @param voter the voter address\n   * @param support boolean, true = vote for, false = vote against\n   * @param votingBalanceProofs list of voting assets proofs\n   * @param v v part of the voter signature\n   * @param r r part of the voter signature\n   * @param s s part of the voter signature\n   */\n  function submitVoteBySignature(\n    uint256 proposalId,\n    address voter,\n    bool support,\n    VotingBalanceProof[] calldata votingBalanceProofs,\n    uint8 v,\n    bytes32 r,\n    bytes32 s\n  ) external;\n\n  /**\n   * @notice method to close a vote on a proposal specified by its id and send the results back to governance\n   * @param proposalId id of the proposal to close the vote on and send the voting result to governance\n   * @dev This method will trigger the bridging flow\n   */\n  function closeAndSendVote(uint256 proposalId) external;\n\n  /**\n   * @notice Function to register the vote of user as its representative\n   * @param proposalId id of the proposal\n   * @param support boolean, true = vote for, false = vote against\n   * @param voter the voter address\n   * @param proofOfRepresentation proof that can validate that msg.sender is the voter representative\n   * @param votingBalanceProofs list of voting assets proofs\n   */\n  function submitVoteAsRepresentative(\n    uint256 proposalId,\n    bool support,\n    address voter,\n    bytes memory proofOfRepresentation,\n    VotingBalanceProof[] calldata votingBalanceProofs\n  ) external;\n\n  /**\n   * @notice Function to register the vote of user as its representative with a signed message\n   * @param proposalId id of the proposal\n   * @param voter the voter address\n   * @param proofOfRepresentation proof that can validate that msg.sender is the voter representative\n   * @param votingBalanceProofs list of voting assets proofs\n   * @param signatureParams object containing the necessary signature parameters\n   */\n  function submitVoteAsRepresentativeBySignature(\n    uint256 proposalId,\n    address voter,\n    address representative,\n    bool support,\n    bytes memory proofOfRepresentation,\n    VotingBalanceProof[] calldata votingBalanceProofs,\n    SignatureParams memory signatureParams\n  ) external;\n}\n"
      },
      "lib/aave-helpers/lib/aave-address-book/src/governance-v3/IVotingPortal.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IBaseReceiverPortal} from './IBaseReceiverPortal.sol';\nimport {IVotingMachineWithProofs} from './IVotingMachineWithProofs.sol';\n\n/**\n * @title IVotingPortal\n * @author BGD Labs\n * @notice interface containing the objects, events and methods definitions of the VotingPortal contract\n */\ninterface IVotingPortal is IBaseReceiverPortal {\n  /**\n   * @notice enum containing the different type of messages that can be bridged\n   * @param Null empty state\n   * @param Proposal indicates that the message is to bridge a proposal configuration\n   */\n  enum MessageType {\n    Null,\n    Proposal\n  }\n\n  /**\n   * @notice emitted when \"Start voting\" gas limit gets updated\n   * @param gasLimit the new gas limit\n   */\n  event StartVotingGasLimitUpdated(uint128 gasLimit);\n\n  /**\n   * @notice emitted when a vote message is received\n   * @param originSender address that sent the message on the origin chain\n   * @param originChainId id of the chain where the message originated\n   * @param delivered flag indicating if message has been delivered\n   * @param message bytes containing the necessary information to queue the bridged proposal id\n   * @param reason bytes with the revert information\n   */\n  event VoteMessageReceived(\n    address indexed originSender,\n    uint256 indexed originChainId,\n    bool indexed delivered,\n    bytes message,\n    bytes reason\n  );\n\n  /**\n   * @notice get the chain id where the voting machine which is deployed\n   * @return network id\n   */\n  function VOTING_MACHINE_CHAIN_ID() external view returns (uint256);\n\n  /**\n   * @notice gets the address of the voting machine on the destination network\n   * @return voting machine address\n   */\n  function VOTING_MACHINE() external view returns (address);\n\n  /**\n   * @notice gets the address of the connected governance\n   * @return governance address\n   */\n  function GOVERNANCE() external view returns (address);\n\n  /**\n   * @notice gets the address of the CrossChainController deployed on current network\n   * @return CrossChainController address\n   */\n  function CROSS_CHAIN_CONTROLLER() external view returns (address);\n\n  /**\n   * @notice method to set the gas limit for \"Start voting\" bridging tx\n   * @param gasLimit the new gas limit\n   */\n  function setStartVotingGasLimit(uint128 gasLimit) external;\n\n  /**\n   * @notice method to get the gas limit for \"Start voting\" bridging tx\n   * @return the gas limit\n   */\n  function getStartVotingGasLimit() external view returns (uint128);\n\n  /**\n   * @notice method to bridge the vote configuration to voting chain, so a vote can be started.\n   * @param proposalId id of the proposal bridged to start the vote on\n   * @param blockHash hash of the block on L1 when the proposal was activated for voting\n   * @param votingDuration duration in seconds of the vote\n   */\n  function forwardStartVotingMessage(\n    uint256 proposalId,\n    bytes32 blockHash,\n    uint24 votingDuration\n  ) external;\n\n  /**\n   * @notice method to decode a message from from voting machine chain\n   * @param message encoded message with message type\n   * @return proposalId, forVotes, againstVotes from the decoded message\n   */\n  function decodeMessage(bytes memory message) external pure returns (uint256, uint128, uint128);\n}\n"
      },
      "lib/aave-helpers/lib/aave-address-book/src/governance-v3/IVotingStrategy.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IDataWarehouse} from './IDataWarehouse.sol';\n\ninterface IVotingStrategy {\n  /**\n   * @notice method to get the DataWarehouse contract\n   * @return DataWarehouse contract\n   */\n  function DATA_WAREHOUSE() external view returns (IDataWarehouse);\n\n  /**\n   * @notice method to get the exchange rate precision. Taken from stkTokenV3 contract\n   * @return exchange rate precission\n   */\n  function STK_AAVE_SLASHING_EXCHANGE_RATE_PRECISION() external view returns (uint256);\n\n  /**\n   * @notice method to get the slot of the stkAave exchange rate in the stkAave contract\n   * @return stkAave exchange rate slot\n   */\n  function STK_AAVE_SLASHING_EXCHANGE_RATE_SLOT() external view returns (uint256);\n\n  /**\n   * @notice method to get the power scale factor of the delegated balances\n   * @return power scale factor\n   */\n  function POWER_SCALE_FACTOR() external view returns (uint256);\n\n  /**\n   * @notice method to get the power of an asset\n   * @param asset address of the token to get the power\n   * @param storageSlot storage position of the balance mapping\n   * @param power balance of a determined asset to be used for the vote\n   * @param blockHash block hash of when we want to get the power. Optional parameter\n   * @return voting power of the specified asset\n   */\n  function getVotingPower(\n    address asset,\n    uint128 storageSlot,\n    uint256 power,\n    bytes32 blockHash\n  ) external view returns (uint256);\n\n  /**\n   * @notice method to check that the roots for all the tokens in the voting strategy have been registered. Including\n             the registry of the stkAave exchange rate slot\n   * @param blockHash hash of the block from where the roots have been registered.\n   */\n  function hasRequiredRoots(bytes32 blockHash) external view;\n}\n"
      },
      "lib/aave-helpers/lib/aave-address-book/src/governance-v3/PayloadsControllerUtils.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.0;\n\nlibrary PayloadsControllerUtils {\n  /// @notice enum with supported access levels\n  enum AccessControl {\n    Level_null, // to not use 0\n    Level_1, // LEVEL_1 - short executor before, listing assets, changes of assets params, updates of the protocol etc\n    Level_2 // LEVEL_2 - long executor before, payloads controller updates\n  }\n\n  /**\n   * @notice Object containing the necessary payload information.\n   * @param chain\n   * @param accessLevel\n   * @param payloadsController\n   * @param payloadId\n   */\n  struct Payload {\n    uint256 chain;\n    AccessControl accessLevel;\n    address payloadsController; // address which holds the logic to execute after success proposal voting\n    uint40 payloadId; // number of the payload placed to payloadsController, max is: ~10¹²\n  }\n}\n"
      },
      "lib/aave-helpers/lib/forge-std/src/Vm.sol": {
        "content": "// Automatically @generated by scripts/vm.py. Do not modify manually.\n\n// SPDX-License-Identifier: MIT OR Apache-2.0\npragma solidity >=0.6.2 <0.9.0;\npragma experimental ABIEncoderV2;\n\n/// The `VmSafe` interface does not allow manipulation of the EVM state or other actions that may\n/// result in Script simulations differing from on-chain execution. It is recommended to only use\n/// these cheats in scripts.\ninterface VmSafe {\n    /// A modification applied to either `msg.sender` or `tx.origin`. Returned by `readCallers`.\n    enum CallerMode {\n        // No caller modification is currently active.\n        None,\n        // A one time broadcast triggered by a `vm.broadcast()` call is currently active.\n        Broadcast,\n        // A recurrent broadcast triggered by a `vm.startBroadcast()` call is currently active.\n        RecurrentBroadcast,\n        // A one time prank triggered by a `vm.prank()` call is currently active.\n        Prank,\n        // A recurrent prank triggered by a `vm.startPrank()` call is currently active.\n        RecurrentPrank\n    }\n\n    /// The kind of account access that occurred.\n    enum AccountAccessKind {\n        // The account was called.\n        Call,\n        // The account was called via delegatecall.\n        DelegateCall,\n        // The account was called via callcode.\n        CallCode,\n        // The account was called via staticcall.\n        StaticCall,\n        // The account was created.\n        Create,\n        // The account was selfdestructed.\n        SelfDestruct,\n        // Synthetic access indicating the current context has resumed after a previous sub-context (AccountAccess).\n        Resume,\n        // The account's balance was read.\n        Balance,\n        // The account's codesize was read.\n        Extcodesize,\n        // The account's codehash was read.\n        Extcodehash,\n        // The account's code was copied.\n        Extcodecopy\n    }\n\n    /// An Ethereum log. Returned by `getRecordedLogs`.\n    struct Log {\n        // The topics of the log, including the signature, if any.\n        bytes32[] topics;\n        // The raw data of the log.\n        bytes data;\n        // The address of the log's emitter.\n        address emitter;\n    }\n\n    /// An RPC URL and its alias. Returned by `rpcUrlStructs`.\n    struct Rpc {\n        // The alias of the RPC URL.\n        string key;\n        // The RPC URL.\n        string url;\n    }\n\n    /// An RPC log object. Returned by `eth_getLogs`.\n    struct EthGetLogs {\n        // The address of the log's emitter.\n        address emitter;\n        // The topics of the log, including the signature, if any.\n        bytes32[] topics;\n        // The raw data of the log.\n        bytes data;\n        // The block hash.\n        bytes32 blockHash;\n        // The block number.\n        uint64 blockNumber;\n        // The transaction hash.\n        bytes32 transactionHash;\n        // The transaction index in the block.\n        uint64 transactionIndex;\n        // The log index.\n        uint256 logIndex;\n        // Whether the log was removed.\n        bool removed;\n    }\n\n    /// A single entry in a directory listing. Returned by `readDir`.\n    struct DirEntry {\n        // The error message, if any.\n        string errorMessage;\n        // The path of the entry.\n        string path;\n        // The depth of the entry.\n        uint64 depth;\n        // Whether the entry is a directory.\n        bool isDir;\n        // Whether the entry is a symlink.\n        bool isSymlink;\n    }\n\n    /// Metadata information about a file.\n    /// This structure is returned from the `fsMetadata` function and represents known\n    /// metadata about a file such as its permissions, size, modification\n    /// times, etc.\n    struct FsMetadata {\n        // True if this metadata is for a directory.\n        bool isDir;\n        // True if this metadata is for a symlink.\n        bool isSymlink;\n        // The size of the file, in bytes, this metadata is for.\n        uint256 length;\n        // True if this metadata is for a readonly (unwritable) file.\n        bool readOnly;\n        // The last modification time listed in this metadata.\n        uint256 modified;\n        // The last access time of this metadata.\n        uint256 accessed;\n        // The creation time listed in this metadata.\n        uint256 created;\n    }\n\n    /// A wallet with a public and private key.\n    struct Wallet {\n        // The wallet's address.\n        address addr;\n        // The wallet's public key `X`.\n        uint256 publicKeyX;\n        // The wallet's public key `Y`.\n        uint256 publicKeyY;\n        // The wallet's private key.\n        uint256 privateKey;\n    }\n\n    /// The result of a `tryFfi` call.\n    struct FfiResult {\n        // The exit code of the call.\n        int32 exitCode;\n        // The optionally hex-decoded `stdout` data.\n        bytes stdout;\n        // The `stderr` data.\n        bytes stderr;\n    }\n\n    /// Information on the chain and fork.\n    struct ChainInfo {\n        // The fork identifier. Set to zero if no fork is active.\n        uint256 forkId;\n        // The chain ID of the current fork.\n        uint256 chainId;\n    }\n\n    /// The result of a `stopAndReturnStateDiff` call.\n    struct AccountAccess {\n        // The chain and fork the access occurred.\n        ChainInfo chainInfo;\n        // The kind of account access that determines what the account is.\n        // If kind is Call, DelegateCall, StaticCall or CallCode, then the account is the callee.\n        // If kind is Create, then the account is the newly created account.\n        // If kind is SelfDestruct, then the account is the selfdestruct recipient.\n        // If kind is a Resume, then account represents a account context that has resumed.\n        AccountAccessKind kind;\n        // The account that was accessed.\n        // It's either the account created, callee or a selfdestruct recipient for CREATE, CALL or SELFDESTRUCT.\n        address account;\n        // What accessed the account.\n        address accessor;\n        // If the account was initialized or empty prior to the access.\n        // An account is considered initialized if it has code, a\n        // non-zero nonce, or a non-zero balance.\n        bool initialized;\n        // The previous balance of the accessed account.\n        uint256 oldBalance;\n        // The potential new balance of the accessed account.\n        // That is, all balance changes are recorded here, even if reverts occurred.\n        uint256 newBalance;\n        // Code of the account deployed by CREATE.\n        bytes deployedCode;\n        // Value passed along with the account access\n        uint256 value;\n        // Input data provided to the CREATE or CALL\n        bytes data;\n        // If this access reverted in either the current or parent context.\n        bool reverted;\n        // An ordered list of storage accesses made during an account access operation.\n        StorageAccess[] storageAccesses;\n    }\n\n    /// The storage accessed during an `AccountAccess`.\n    struct StorageAccess {\n        // The account whose storage was accessed.\n        address account;\n        // The slot that was accessed.\n        bytes32 slot;\n        // If the access was a write.\n        bool isWrite;\n        // The previous value of the slot.\n        bytes32 previousValue;\n        // The new value of the slot.\n        bytes32 newValue;\n        // If the access was reverted.\n        bool reverted;\n    }\n\n    // ======== Environment ========\n\n    /// Gets the environment variable `name` and parses it as `address`.\n    /// Reverts if the variable was not found or could not be parsed.\n    function envAddress(string calldata name) external view returns (address value);\n\n    /// Gets the environment variable `name` and parses it as an array of `address`, delimited by `delim`.\n    /// Reverts if the variable was not found or could not be parsed.\n    function envAddress(string calldata name, string calldata delim) external view returns (address[] memory value);\n\n    /// Gets the environment variable `name` and parses it as `bool`.\n    /// Reverts if the variable was not found or could not be parsed.\n    function envBool(string calldata name) external view returns (bool value);\n\n    /// Gets the environment variable `name` and parses it as an array of `bool`, delimited by `delim`.\n    /// Reverts if the variable was not found or could not be parsed.\n    function envBool(string calldata name, string calldata delim) external view returns (bool[] memory value);\n\n    /// Gets the environment variable `name` and parses it as `bytes32`.\n    /// Reverts if the variable was not found or could not be parsed.\n    function envBytes32(string calldata name) external view returns (bytes32 value);\n\n    /// Gets the environment variable `name` and parses it as an array of `bytes32`, delimited by `delim`.\n    /// Reverts if the variable was not found or could not be parsed.\n    function envBytes32(string calldata name, string calldata delim) external view returns (bytes32[] memory value);\n\n    /// Gets the environment variable `name` and parses it as `bytes`.\n    /// Reverts if the variable was not found or could not be parsed.\n    function envBytes(string calldata name) external view returns (bytes memory value);\n\n    /// Gets the environment variable `name` and parses it as an array of `bytes`, delimited by `delim`.\n    /// Reverts if the variable was not found or could not be parsed.\n    function envBytes(string calldata name, string calldata delim) external view returns (bytes[] memory value);\n\n    /// Gets the environment variable `name` and parses it as `int256`.\n    /// Reverts if the variable was not found or could not be parsed.\n    function envInt(string calldata name) external view returns (int256 value);\n\n    /// Gets the environment variable `name` and parses it as an array of `int256`, delimited by `delim`.\n    /// Reverts if the variable was not found or could not be parsed.\n    function envInt(string calldata name, string calldata delim) external view returns (int256[] memory value);\n\n    /// Gets the environment variable `name` and parses it as `bool`.\n    /// Reverts if the variable could not be parsed.\n    /// Returns `defaultValue` if the variable was not found.\n    function envOr(string calldata name, bool defaultValue) external view returns (bool value);\n\n    /// Gets the environment variable `name` and parses it as `uint256`.\n    /// Reverts if the variable could not be parsed.\n    /// Returns `defaultValue` if the variable was not found.\n    function envOr(string calldata name, uint256 defaultValue) external view returns (uint256 value);\n\n    /// Gets the environment variable `name` and parses it as an array of `address`, delimited by `delim`.\n    /// Reverts if the variable could not be parsed.\n    /// Returns `defaultValue` if the variable was not found.\n    function envOr(string calldata name, string calldata delim, address[] calldata defaultValue)\n        external\n        view\n        returns (address[] memory value);\n\n    /// Gets the environment variable `name` and parses it as an array of `bytes32`, delimited by `delim`.\n    /// Reverts if the variable could not be parsed.\n    /// Returns `defaultValue` if the variable was not found.\n    function envOr(string calldata name, string calldata delim, bytes32[] calldata defaultValue)\n        external\n        view\n        returns (bytes32[] memory value);\n\n    /// Gets the environment variable `name` and parses it as an array of `string`, delimited by `delim`.\n    /// Reverts if the variable could not be parsed.\n    /// Returns `defaultValue` if the variable was not found.\n    function envOr(string calldata name, string calldata delim, string[] calldata defaultValue)\n        external\n        view\n        returns (string[] memory value);\n\n    /// Gets the environment variable `name` and parses it as an array of `bytes`, delimited by `delim`.\n    /// Reverts if the variable could not be parsed.\n    /// Returns `defaultValue` if the variable was not found.\n    function envOr(string calldata name, string calldata delim, bytes[] calldata defaultValue)\n        external\n        view\n        returns (bytes[] memory value);\n\n    /// Gets the environment variable `name` and parses it as `int256`.\n    /// Reverts if the variable could not be parsed.\n    /// Returns `defaultValue` if the variable was not found.\n    function envOr(string calldata name, int256 defaultValue) external view returns (int256 value);\n\n    /// Gets the environment variable `name` and parses it as `address`.\n    /// Reverts if the variable could not be parsed.\n    /// Returns `defaultValue` if the variable was not found.\n    function envOr(string calldata name, address defaultValue) external view returns (address value);\n\n    /// Gets the environment variable `name` and parses it as `bytes32`.\n    /// Reverts if the variable could not be parsed.\n    /// Returns `defaultValue` if the variable was not found.\n    function envOr(string calldata name, bytes32 defaultValue) external view returns (bytes32 value);\n\n    /// Gets the environment variable `name` and parses it as `string`.\n    /// Reverts if the variable could not be parsed.\n    /// Returns `defaultValue` if the variable was not found.\n    function envOr(string calldata name, string calldata defaultValue) external view returns (string memory value);\n\n    /// Gets the environment variable `name` and parses it as `bytes`.\n    /// Reverts if the variable could not be parsed.\n    /// Returns `defaultValue` if the variable was not found.\n    function envOr(string calldata name, bytes calldata defaultValue) external view returns (bytes memory value);\n\n    /// Gets the environment variable `name` and parses it as an array of `bool`, delimited by `delim`.\n    /// Reverts if the variable could not be parsed.\n    /// Returns `defaultValue` if the variable was not found.\n    function envOr(string calldata name, string calldata delim, bool[] calldata defaultValue)\n        external\n        view\n        returns (bool[] memory value);\n\n    /// Gets the environment variable `name` and parses it as an array of `uint256`, delimited by `delim`.\n    /// Reverts if the variable could not be parsed.\n    /// Returns `defaultValue` if the variable was not found.\n    function envOr(string calldata name, string calldata delim, uint256[] calldata defaultValue)\n        external\n        view\n        returns (uint256[] memory value);\n\n    /// Gets the environment variable `name` and parses it as an array of `int256`, delimited by `delim`.\n    /// Reverts if the variable could not be parsed.\n    /// Returns `defaultValue` if the variable was not found.\n    function envOr(string calldata name, string calldata delim, int256[] calldata defaultValue)\n        external\n        view\n        returns (int256[] memory value);\n\n    /// Gets the environment variable `name` and parses it as `string`.\n    /// Reverts if the variable was not found or could not be parsed.\n    function envString(string calldata name) external view returns (string memory value);\n\n    /// Gets the environment variable `name` and parses it as an array of `string`, delimited by `delim`.\n    /// Reverts if the variable was not found or could not be parsed.\n    function envString(string calldata name, string calldata delim) external view returns (string[] memory value);\n\n    /// Gets the environment variable `name` and parses it as `uint256`.\n    /// Reverts if the variable was not found or could not be parsed.\n    function envUint(string calldata name) external view returns (uint256 value);\n\n    /// Gets the environment variable `name` and parses it as an array of `uint256`, delimited by `delim`.\n    /// Reverts if the variable was not found or could not be parsed.\n    function envUint(string calldata name, string calldata delim) external view returns (uint256[] memory value);\n\n    /// Sets environment variables.\n    function setEnv(string calldata name, string calldata value) external;\n\n    // ======== EVM ========\n\n    /// Gets all accessed reads and write slot from a `vm.record` session, for a given address.\n    function accesses(address target) external returns (bytes32[] memory readSlots, bytes32[] memory writeSlots);\n\n    /// Gets the address for a given private key.\n    function addr(uint256 privateKey) external pure returns (address keyAddr);\n\n    /// Gets all the logs according to specified filter.\n    function eth_getLogs(uint256 fromBlock, uint256 toBlock, address target, bytes32[] calldata topics)\n        external\n        returns (EthGetLogs[] memory logs);\n\n    /// Gets the current `block.number`.\n    /// You should use this instead of `block.number` if you use `vm.roll`, as `block.number` is assumed to be constant across a transaction,\n    /// and as a result will get optimized out by the compiler.\n    /// See https://github.com/foundry-rs/foundry/issues/6180\n    function getBlockNumber() external view returns (uint256 height);\n\n    /// Gets the current `block.timestamp`.\n    /// You should use this instead of `block.timestamp` if you use `vm.warp`, as `block.timestamp` is assumed to be constant across a transaction,\n    /// and as a result will get optimized out by the compiler.\n    /// See https://github.com/foundry-rs/foundry/issues/6180\n    function getBlockTimestamp() external view returns (uint256 timestamp);\n\n    /// Gets the map key and parent of a mapping at a given slot, for a given address.\n    function getMappingKeyAndParentOf(address target, bytes32 elementSlot)\n        external\n        returns (bool found, bytes32 key, bytes32 parent);\n\n    /// Gets the number of elements in the mapping at the given slot, for a given address.\n    function getMappingLength(address target, bytes32 mappingSlot) external returns (uint256 length);\n\n    /// Gets the elements at index idx of the mapping at the given slot, for a given address. The\n    /// index must be less than the length of the mapping (i.e. the number of keys in the mapping).\n    function getMappingSlotAt(address target, bytes32 mappingSlot, uint256 idx) external returns (bytes32 value);\n\n    /// Gets the nonce of an account.\n    function getNonce(address account) external view returns (uint64 nonce);\n\n    /// Gets all the recorded logs.\n    function getRecordedLogs() external returns (Log[] memory logs);\n\n    /// Loads a storage slot from an address.\n    function load(address target, bytes32 slot) external view returns (bytes32 data);\n\n    /// Pauses gas metering (i.e. gas usage is not counted). Noop if already paused.\n    function pauseGasMetering() external;\n\n    /// Records all storage reads and writes.\n    function record() external;\n\n    /// Record all the transaction logs.\n    function recordLogs() external;\n\n    /// Resumes gas metering (i.e. gas usage is counted again). Noop if already on.\n    function resumeGasMetering() external;\n\n    /// Performs an Ethereum JSON-RPC request to the current fork URL.\n    function rpc(string calldata method, string calldata params) external returns (bytes memory data);\n\n    /// Signs `digest` with `privateKey` using the secp256r1 curve.\n    function signP256(uint256 privateKey, bytes32 digest) external pure returns (bytes32 r, bytes32 s);\n\n    /// Signs `digest` with `privateKey` using the secp256k1 curve.\n    function sign(uint256 privateKey, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s);\n\n    /// Starts recording all map SSTOREs for later retrieval.\n    function startMappingRecording() external;\n\n    /// Record all account accesses as part of CREATE, CALL or SELFDESTRUCT opcodes in order,\n    /// along with the context of the calls\n    function startStateDiffRecording() external;\n\n    /// Returns an ordered array of all account accesses from a `vm.startStateDiffRecording` session.\n    function stopAndReturnStateDiff() external returns (AccountAccess[] memory accountAccesses);\n\n    /// Stops recording all map SSTOREs for later retrieval and clears the recorded data.\n    function stopMappingRecording() external;\n\n    // ======== Filesystem ========\n\n    /// Closes file for reading, resetting the offset and allowing to read it from beginning with readLine.\n    /// `path` is relative to the project root.\n    function closeFile(string calldata path) external;\n\n    /// Copies the contents of one file to another. This function will **overwrite** the contents of `to`.\n    /// On success, the total number of bytes copied is returned and it is equal to the length of the `to` file as reported by `metadata`.\n    /// Both `from` and `to` are relative to the project root.\n    function copyFile(string calldata from, string calldata to) external returns (uint64 copied);\n\n    /// Creates a new, empty directory at the provided path.\n    /// This cheatcode will revert in the following situations, but is not limited to just these cases:\n    /// - User lacks permissions to modify `path`.\n    /// - A parent of the given path doesn't exist and `recursive` is false.\n    /// - `path` already exists and `recursive` is false.\n    /// `path` is relative to the project root.\n    function createDir(string calldata path, bool recursive) external;\n\n    /// Returns true if the given path points to an existing entity, else returns false.\n    function exists(string calldata path) external returns (bool result);\n\n    /// Performs a foreign function call via the terminal.\n    function ffi(string[] calldata commandInput) external returns (bytes memory result);\n\n    /// Given a path, query the file system to get information about a file, directory, etc.\n    function fsMetadata(string calldata path) external view returns (FsMetadata memory metadata);\n\n    /// Gets the creation bytecode from an artifact file. Takes in the relative path to the json file.\n    function getCode(string calldata artifactPath) external view returns (bytes memory creationBytecode);\n\n    /// Gets the deployed bytecode from an artifact file. Takes in the relative path to the json file.\n    function getDeployedCode(string calldata artifactPath) external view returns (bytes memory runtimeBytecode);\n\n    /// Returns true if the path exists on disk and is pointing at a directory, else returns false.\n    function isDir(string calldata path) external returns (bool result);\n\n    /// Returns true if the path exists on disk and is pointing at a regular file, else returns false.\n    function isFile(string calldata path) external returns (bool result);\n\n    /// Get the path of the current project root.\n    function projectRoot() external view returns (string memory path);\n\n    /// Reads the directory at the given path recursively, up to `maxDepth`.\n    /// `maxDepth` defaults to 1, meaning only the direct children of the given directory will be returned.\n    /// Follows symbolic links if `followLinks` is true.\n    function readDir(string calldata path) external view returns (DirEntry[] memory entries);\n\n    /// See `readDir(string)`.\n    function readDir(string calldata path, uint64 maxDepth) external view returns (DirEntry[] memory entries);\n\n    /// See `readDir(string)`.\n    function readDir(string calldata path, uint64 maxDepth, bool followLinks)\n        external\n        view\n        returns (DirEntry[] memory entries);\n\n    /// Reads the entire content of file to string. `path` is relative to the project root.\n    function readFile(string calldata path) external view returns (string memory data);\n\n    /// Reads the entire content of file as binary. `path` is relative to the project root.\n    function readFileBinary(string calldata path) external view returns (bytes memory data);\n\n    /// Reads next line of file to string.\n    function readLine(string calldata path) external view returns (string memory line);\n\n    /// Reads a symbolic link, returning the path that the link points to.\n    /// This cheatcode will revert in the following situations, but is not limited to just these cases:\n    /// - `path` is not a symbolic link.\n    /// - `path` does not exist.\n    function readLink(string calldata linkPath) external view returns (string memory targetPath);\n\n    /// Removes a directory at the provided path.\n    /// This cheatcode will revert in the following situations, but is not limited to just these cases:\n    /// - `path` doesn't exist.\n    /// - `path` isn't a directory.\n    /// - User lacks permissions to modify `path`.\n    /// - The directory is not empty and `recursive` is false.\n    /// `path` is relative to the project root.\n    function removeDir(string calldata path, bool recursive) external;\n\n    /// Removes a file from the filesystem.\n    /// This cheatcode will revert in the following situations, but is not limited to just these cases:\n    /// - `path` points to a directory.\n    /// - The file doesn't exist.\n    /// - The user lacks permissions to remove the file.\n    /// `path` is relative to the project root.\n    function removeFile(string calldata path) external;\n\n    /// Performs a foreign function call via terminal and returns the exit code, stdout, and stderr.\n    function tryFfi(string[] calldata commandInput) external returns (FfiResult memory result);\n\n    /// Returns the time since unix epoch in milliseconds.\n    function unixTime() external returns (uint256 milliseconds);\n\n    /// Writes data to file, creating a file if it does not exist, and entirely replacing its contents if it does.\n    /// `path` is relative to the project root.\n    function writeFile(string calldata path, string calldata data) external;\n\n    /// Writes binary data to a file, creating a file if it does not exist, and entirely replacing its contents if it does.\n    /// `path` is relative to the project root.\n    function writeFileBinary(string calldata path, bytes calldata data) external;\n\n    /// Writes line to file, creating a file if it does not exist.\n    /// `path` is relative to the project root.\n    function writeLine(string calldata path, string calldata data) external;\n\n    // ======== JSON ========\n\n    /// Checks if `key` exists in a JSON object.\n    function keyExists(string calldata json, string calldata key) external view returns (bool);\n\n    /// Parses a string of JSON data at `key` and coerces it to `address`.\n    function parseJsonAddress(string calldata json, string calldata key) external pure returns (address);\n\n    /// Parses a string of JSON data at `key` and coerces it to `address[]`.\n    function parseJsonAddressArray(string calldata json, string calldata key)\n        external\n        pure\n        returns (address[] memory);\n\n    /// Parses a string of JSON data at `key` and coerces it to `bool`.\n    function parseJsonBool(string calldata json, string calldata key) external pure returns (bool);\n\n    /// Parses a string of JSON data at `key` and coerces it to `bool[]`.\n    function parseJsonBoolArray(string calldata json, string calldata key) external pure returns (bool[] memory);\n\n    /// Parses a string of JSON data at `key` and coerces it to `bytes`.\n    function parseJsonBytes(string calldata json, string calldata key) external pure returns (bytes memory);\n\n    /// Parses a string of JSON data at `key` and coerces it to `bytes32`.\n    function parseJsonBytes32(string calldata json, string calldata key) external pure returns (bytes32);\n\n    /// Parses a string of JSON data at `key` and coerces it to `bytes32[]`.\n    function parseJsonBytes32Array(string calldata json, string calldata key)\n        external\n        pure\n        returns (bytes32[] memory);\n\n    /// Parses a string of JSON data at `key` and coerces it to `bytes[]`.\n    function parseJsonBytesArray(string calldata json, string calldata key) external pure returns (bytes[] memory);\n\n    /// Parses a string of JSON data at `key` and coerces it to `int256`.\n    function parseJsonInt(string calldata json, string calldata key) external pure returns (int256);\n\n    /// Parses a string of JSON data at `key` and coerces it to `int256[]`.\n    function parseJsonIntArray(string calldata json, string calldata key) external pure returns (int256[] memory);\n\n    /// Returns an array of all the keys in a JSON object.\n    function parseJsonKeys(string calldata json, string calldata key) external pure returns (string[] memory keys);\n\n    /// Parses a string of JSON data at `key` and coerces it to `string`.\n    function parseJsonString(string calldata json, string calldata key) external pure returns (string memory);\n\n    /// Parses a string of JSON data at `key` and coerces it to `string[]`.\n    function parseJsonStringArray(string calldata json, string calldata key) external pure returns (string[] memory);\n\n    /// Parses a string of JSON data at `key` and coerces it to `uint256`.\n    function parseJsonUint(string calldata json, string calldata key) external pure returns (uint256);\n\n    /// Parses a string of JSON data at `key` and coerces it to `uint256[]`.\n    function parseJsonUintArray(string calldata json, string calldata key) external pure returns (uint256[] memory);\n\n    /// ABI-encodes a JSON object.\n    function parseJson(string calldata json) external pure returns (bytes memory abiEncodedData);\n\n    /// ABI-encodes a JSON object at `key`.\n    function parseJson(string calldata json, string calldata key) external pure returns (bytes memory abiEncodedData);\n\n    /// See `serializeJson`.\n    function serializeAddress(string calldata objectKey, string calldata valueKey, address value)\n        external\n        returns (string memory json);\n\n    /// See `serializeJson`.\n    function serializeAddress(string calldata objectKey, string calldata valueKey, address[] calldata values)\n        external\n        returns (string memory json);\n\n    /// See `serializeJson`.\n    function serializeBool(string calldata objectKey, string calldata valueKey, bool value)\n        external\n        returns (string memory json);\n\n    /// See `serializeJson`.\n    function serializeBool(string calldata objectKey, string calldata valueKey, bool[] calldata values)\n        external\n        returns (string memory json);\n\n    /// See `serializeJson`.\n    function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32 value)\n        external\n        returns (string memory json);\n\n    /// See `serializeJson`.\n    function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32[] calldata values)\n        external\n        returns (string memory json);\n\n    /// See `serializeJson`.\n    function serializeBytes(string calldata objectKey, string calldata valueKey, bytes calldata value)\n        external\n        returns (string memory json);\n\n    /// See `serializeJson`.\n    function serializeBytes(string calldata objectKey, string calldata valueKey, bytes[] calldata values)\n        external\n        returns (string memory json);\n\n    /// See `serializeJson`.\n    function serializeInt(string calldata objectKey, string calldata valueKey, int256 value)\n        external\n        returns (string memory json);\n\n    /// See `serializeJson`.\n    function serializeInt(string calldata objectKey, string calldata valueKey, int256[] calldata values)\n        external\n        returns (string memory json);\n\n    /// Serializes a key and value to a JSON object stored in-memory that can be later written to a file.\n    /// Returns the stringified version of the specific JSON file up to that moment.\n    function serializeJson(string calldata objectKey, string calldata value) external returns (string memory json);\n\n    /// See `serializeJson`.\n    function serializeString(string calldata objectKey, string calldata valueKey, string calldata value)\n        external\n        returns (string memory json);\n\n    /// See `serializeJson`.\n    function serializeString(string calldata objectKey, string calldata valueKey, string[] calldata values)\n        external\n        returns (string memory json);\n\n    /// See `serializeJson`.\n    function serializeUint(string calldata objectKey, string calldata valueKey, uint256 value)\n        external\n        returns (string memory json);\n\n    /// See `serializeJson`.\n    function serializeUint(string calldata objectKey, string calldata valueKey, uint256[] calldata values)\n        external\n        returns (string memory json);\n\n    /// Write a serialized JSON object to a file. If the file exists, it will be overwritten.\n    function writeJson(string calldata json, string calldata path) external;\n\n    /// Write a serialized JSON object to an **existing** JSON file, replacing a value with key = <value_key.>\n    /// This is useful to replace a specific value of a JSON file, without having to parse the entire thing.\n    function writeJson(string calldata json, string calldata path, string calldata valueKey) external;\n\n    // ======== Scripting ========\n\n    /// Using the address that calls the test contract, has the next call (at this call depth only)\n    /// create a transaction that can later be signed and sent onchain.\n    function broadcast() external;\n\n    /// Has the next call (at this call depth only) create a transaction with the address provided\n    /// as the sender that can later be signed and sent onchain.\n    function broadcast(address signer) external;\n\n    /// Has the next call (at this call depth only) create a transaction with the private key\n    /// provided as the sender that can later be signed and sent onchain.\n    function broadcast(uint256 privateKey) external;\n\n    /// Using the address that calls the test contract, has all subsequent calls\n    /// (at this call depth only) create transactions that can later be signed and sent onchain.\n    function startBroadcast() external;\n\n    /// Has all subsequent calls (at this call depth only) create transactions with the address\n    /// provided that can later be signed and sent onchain.\n    function startBroadcast(address signer) external;\n\n    /// Has all subsequent calls (at this call depth only) create transactions with the private key\n    /// provided that can later be signed and sent onchain.\n    function startBroadcast(uint256 privateKey) external;\n\n    /// Stops collecting onchain transactions.\n    function stopBroadcast() external;\n\n    // ======== String ========\n\n    /// Parses the given `string` into an `address`.\n    function parseAddress(string calldata stringifiedValue) external pure returns (address parsedValue);\n\n    /// Parses the given `string` into a `bool`.\n    function parseBool(string calldata stringifiedValue) external pure returns (bool parsedValue);\n\n    /// Parses the given `string` into `bytes`.\n    function parseBytes(string calldata stringifiedValue) external pure returns (bytes memory parsedValue);\n\n    /// Parses the given `string` into a `bytes32`.\n    function parseBytes32(string calldata stringifiedValue) external pure returns (bytes32 parsedValue);\n\n    /// Parses the given `string` into a `int256`.\n    function parseInt(string calldata stringifiedValue) external pure returns (int256 parsedValue);\n\n    /// Parses the given `string` into a `uint256`.\n    function parseUint(string calldata stringifiedValue) external pure returns (uint256 parsedValue);\n\n    /// Converts the given value to a `string`.\n    function toString(address value) external pure returns (string memory stringifiedValue);\n\n    /// Converts the given value to a `string`.\n    function toString(bytes calldata value) external pure returns (string memory stringifiedValue);\n\n    /// Converts the given value to a `string`.\n    function toString(bytes32 value) external pure returns (string memory stringifiedValue);\n\n    /// Converts the given value to a `string`.\n    function toString(bool value) external pure returns (string memory stringifiedValue);\n\n    /// Converts the given value to a `string`.\n    function toString(uint256 value) external pure returns (string memory stringifiedValue);\n\n    /// Converts the given value to a `string`.\n    function toString(int256 value) external pure returns (string memory stringifiedValue);\n\n    // ======== Testing ========\n\n    /// If the condition is false, discard this run's fuzz inputs and generate new ones.\n    function assume(bool condition) external pure;\n\n    /// Writes a breakpoint to jump to in the debugger.\n    function breakpoint(string calldata char) external;\n\n    /// Writes a conditional breakpoint to jump to in the debugger.\n    function breakpoint(string calldata char, bool value) external;\n\n    /// Returns the RPC url for the given alias.\n    function rpcUrl(string calldata rpcAlias) external view returns (string memory json);\n\n    /// Returns all rpc urls and their aliases as structs.\n    function rpcUrlStructs() external view returns (Rpc[] memory urls);\n\n    /// Returns all rpc urls and their aliases `[alias, url][]`.\n    function rpcUrls() external view returns (string[2][] memory urls);\n\n    /// Suspends execution of the main thread for `duration` milliseconds.\n    function sleep(uint256 duration) external;\n\n    // ======== Utilities ========\n\n    /// Compute the address of a contract created with CREATE2 using the given CREATE2 deployer.\n    function computeCreate2Address(bytes32 salt, bytes32 initCodeHash, address deployer)\n        external\n        pure\n        returns (address);\n\n    /// Compute the address of a contract created with CREATE2 using the default CREATE2 deployer.\n    function computeCreate2Address(bytes32 salt, bytes32 initCodeHash) external pure returns (address);\n\n    /// Compute the address a contract will be deployed at for a given deployer address and nonce.\n    function computeCreateAddress(address deployer, uint256 nonce) external pure returns (address);\n\n    /// Derives a private key from the name, labels the account with that name, and returns the wallet.\n    function createWallet(string calldata walletLabel) external returns (Wallet memory wallet);\n\n    /// Generates a wallet from the private key and returns the wallet.\n    function createWallet(uint256 privateKey) external returns (Wallet memory wallet);\n\n    /// Generates a wallet from the private key, labels the account with that name, and returns the wallet.\n    function createWallet(uint256 privateKey, string calldata walletLabel) external returns (Wallet memory wallet);\n\n    /// Derive a private key from a provided mnenomic string (or mnenomic file path)\n    /// at the derivation path `m/44'/60'/0'/0/{index}`.\n    function deriveKey(string calldata mnemonic, uint32 index) external pure returns (uint256 privateKey);\n\n    /// Derive a private key from a provided mnenomic string (or mnenomic file path)\n    /// at `{derivationPath}{index}`.\n    function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index)\n        external\n        pure\n        returns (uint256 privateKey);\n\n    /// Derive a private key from a provided mnenomic string (or mnenomic file path) in the specified language\n    /// at the derivation path `m/44'/60'/0'/0/{index}`.\n    function deriveKey(string calldata mnemonic, uint32 index, string calldata language)\n        external\n        pure\n        returns (uint256 privateKey);\n\n    /// Derive a private key from a provided mnenomic string (or mnenomic file path) in the specified language\n    /// at `{derivationPath}{index}`.\n    function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index, string calldata language)\n        external\n        pure\n        returns (uint256 privateKey);\n\n    /// Gets the label for the specified address.\n    function getLabel(address account) external view returns (string memory currentLabel);\n\n    /// Get a `Wallet`'s nonce.\n    function getNonce(Wallet calldata wallet) external returns (uint64 nonce);\n\n    /// Labels an address in call traces.\n    function label(address account, string calldata newLabel) external;\n\n    /// Adds a private key to the local forge wallet and returns the address.\n    function rememberKey(uint256 privateKey) external returns (address keyAddr);\n\n    /// Signs data with a `Wallet`.\n    function sign(Wallet calldata wallet, bytes32 digest) external returns (uint8 v, bytes32 r, bytes32 s);\n\n    /// Encodes a `bytes` value to a base64url string.\n    function toBase64URL(bytes calldata data) external pure returns (string memory);\n\n    /// Encodes a `string` value to a base64url string.\n    function toBase64URL(string calldata data) external pure returns (string memory);\n\n    /// Encodes a `bytes` value to a base64 string.\n    function toBase64(bytes calldata data) external pure returns (string memory);\n\n    /// Encodes a `string` value to a base64 string.\n    function toBase64(string calldata data) external pure returns (string memory);\n}\n\n/// The `Vm` interface does allow manipulation of the EVM state. These are all intended to be used\n/// in tests, but it is not recommended to use these cheats in scripts.\ninterface Vm is VmSafe {\n    // ======== EVM ========\n\n    /// Returns the identifier of the currently active fork. Reverts if no fork is currently active.\n    function activeFork() external view returns (uint256 forkId);\n\n    /// In forking mode, explicitly grant the given address cheatcode access.\n    function allowCheatcodes(address account) external;\n\n    /// Sets `block.chainid`.\n    function chainId(uint256 newChainId) external;\n\n    /// Clears all mocked calls.\n    function clearMockedCalls() external;\n\n    /// Sets `block.coinbase`.\n    function coinbase(address newCoinbase) external;\n\n    /// Creates a new fork with the given endpoint and the _latest_ block and returns the identifier of the fork.\n    function createFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n    /// Creates a new fork with the given endpoint and block and returns the identifier of the fork.\n    function createFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n    /// Creates a new fork with the given endpoint and at the block the given transaction was mined in,\n    /// replays all transaction mined in the block before the transaction, and returns the identifier of the fork.\n    function createFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n    /// Creates and also selects a new fork with the given endpoint and the latest block and returns the identifier of the fork.\n    function createSelectFork(string calldata urlOrAlias) external returns (uint256 forkId);\n\n    /// Creates and also selects a new fork with the given endpoint and block and returns the identifier of the fork.\n    function createSelectFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);\n\n    /// Creates and also selects new fork with the given endpoint and at the block the given transaction was mined in,\n    /// replays all transaction mined in the block before the transaction, returns the identifier of the fork.\n    function createSelectFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);\n\n    /// Sets an address' balance.\n    function deal(address account, uint256 newBalance) external;\n\n    /// Removes the snapshot with the given ID created by `snapshot`.\n    /// Takes the snapshot ID to delete.\n    /// Returns `true` if the snapshot was successfully deleted.\n    /// Returns `false` if the snapshot does not exist.\n    function deleteSnapshot(uint256 snapshotId) external returns (bool success);\n\n    /// Removes _all_ snapshots previously created by `snapshot`.\n    function deleteSnapshots() external;\n\n    /// Sets `block.difficulty`.\n    /// Not available on EVM versions from Paris onwards. Use `prevrandao` instead.\n    /// Reverts if used on unsupported EVM versions.\n    function difficulty(uint256 newDifficulty) external;\n\n    /// Dump a genesis JSON file's `allocs` to disk.\n    function dumpState(string calldata pathToStateJson) external;\n\n    /// Sets an address' code.\n    function etch(address target, bytes calldata newRuntimeBytecode) external;\n\n    /// Sets `block.basefee`.\n    function fee(uint256 newBasefee) external;\n\n    /// Returns true if the account is marked as persistent.\n    function isPersistent(address account) external view returns (bool persistent);\n\n    /// Load a genesis JSON file's `allocs` into the in-memory revm state.\n    function loadAllocs(string calldata pathToAllocsJson) external;\n\n    /// Marks that the account(s) should use persistent storage across fork swaps in a multifork setup\n    /// Meaning, changes made to the state of this account will be kept when switching forks.\n    function makePersistent(address account) external;\n\n    /// See `makePersistent(address)`.\n    function makePersistent(address account0, address account1) external;\n\n    /// See `makePersistent(address)`.\n    function makePersistent(address account0, address account1, address account2) external;\n\n    /// See `makePersistent(address)`.\n    function makePersistent(address[] calldata accounts) external;\n\n    /// Reverts a call to an address with specified revert data.\n    function mockCallRevert(address callee, bytes calldata data, bytes calldata revertData) external;\n\n    /// Reverts a call to an address with a specific `msg.value`, with specified revert data.\n    function mockCallRevert(address callee, uint256 msgValue, bytes calldata data, bytes calldata revertData)\n        external;\n\n    /// Mocks a call to an address, returning specified data.\n    /// Calldata can either be strict or a partial match, e.g. if you only\n    /// pass a Solidity selector to the expected calldata, then the entire Solidity\n    /// function will be mocked.\n    function mockCall(address callee, bytes calldata data, bytes calldata returnData) external;\n\n    /// Mocks a call to an address with a specific `msg.value`, returning specified data.\n    /// Calldata match takes precedence over `msg.value` in case of ambiguity.\n    function mockCall(address callee, uint256 msgValue, bytes calldata data, bytes calldata returnData) external;\n\n    /// Sets the *next* call's `msg.sender` to be the input address.\n    function prank(address msgSender) external;\n\n    /// Sets the *next* call's `msg.sender` to be the input address, and the `tx.origin` to be the second input.\n    function prank(address msgSender, address txOrigin) external;\n\n    /// Sets `block.prevrandao`.\n    /// Not available on EVM versions before Paris. Use `difficulty` instead.\n    /// If used on unsupported EVM versions it will revert.\n    function prevrandao(bytes32 newPrevrandao) external;\n\n    /// Reads the current `msg.sender` and `tx.origin` from state and reports if there is any active caller modification.\n    function readCallers() external returns (CallerMode callerMode, address msgSender, address txOrigin);\n\n    /// Resets the nonce of an account to 0 for EOAs and 1 for contract accounts.\n    function resetNonce(address account) external;\n\n    /// Revert the state of the EVM to a previous snapshot\n    /// Takes the snapshot ID to revert to.\n    /// Returns `true` if the snapshot was successfully reverted.\n    /// Returns `false` if the snapshot does not exist.\n    /// **Note:** This does not automatically delete the snapshot. To delete the snapshot use `deleteSnapshot`.\n    function revertTo(uint256 snapshotId) external returns (bool success);\n\n    /// Revert the state of the EVM to a previous snapshot and automatically deletes the snapshots\n    /// Takes the snapshot ID to revert to.\n    /// Returns `true` if the snapshot was successfully reverted and deleted.\n    /// Returns `false` if the snapshot does not exist.\n    function revertToAndDelete(uint256 snapshotId) external returns (bool success);\n\n    /// Revokes persistent status from the address, previously added via `makePersistent`.\n    function revokePersistent(address account) external;\n\n    /// See `revokePersistent(address)`.\n    function revokePersistent(address[] calldata accounts) external;\n\n    /// Sets `block.height`.\n    function roll(uint256 newHeight) external;\n\n    /// Updates the currently active fork to given block number\n    /// This is similar to `roll` but for the currently active fork.\n    function rollFork(uint256 blockNumber) external;\n\n    /// Updates the currently active fork to given transaction. This will `rollFork` with the number\n    /// of the block the transaction was mined in and replays all transaction mined before it in the block.\n    function rollFork(bytes32 txHash) external;\n\n    /// Updates the given fork to given block number.\n    function rollFork(uint256 forkId, uint256 blockNumber) external;\n\n    /// Updates the given fork to block number of the given transaction and replays all transaction mined before it in the block.\n    function rollFork(uint256 forkId, bytes32 txHash) external;\n\n    /// Takes a fork identifier created by `createFork` and sets the corresponding forked state as active.\n    function selectFork(uint256 forkId) external;\n\n    /// Sets the nonce of an account. Must be higher than the current nonce of the account.\n    function setNonce(address account, uint64 newNonce) external;\n\n    /// Sets the nonce of an account to an arbitrary value.\n    function setNonceUnsafe(address account, uint64 newNonce) external;\n\n    /// Snapshot the current state of the evm.\n    /// Returns the ID of the snapshot that was created.\n    /// To revert a snapshot use `revertTo`.\n    function snapshot() external returns (uint256 snapshotId);\n\n    /// Sets all subsequent calls' `msg.sender` to be the input address until `stopPrank` is called.\n    function startPrank(address msgSender) external;\n\n    /// Sets all subsequent calls' `msg.sender` to be the input address until `stopPrank` is called, and the `tx.origin` to be the second input.\n    function startPrank(address msgSender, address txOrigin) external;\n\n    /// Resets subsequent calls' `msg.sender` to be `address(this)`.\n    function stopPrank() external;\n\n    /// Stores a value to an address' storage slot.\n    function store(address target, bytes32 slot, bytes32 value) external;\n\n    /// Fetches the given transaction from the active fork and executes it on the current state.\n    function transact(bytes32 txHash) external;\n\n    /// Fetches the given transaction from the given fork and executes it on the current state.\n    function transact(uint256 forkId, bytes32 txHash) external;\n\n    /// Sets `tx.gasprice`.\n    function txGasPrice(uint256 newGasPrice) external;\n\n    /// Sets `block.timestamp`.\n    function warp(uint256 newTimestamp) external;\n\n    // ======== Testing ========\n\n    /// Expect a call to an address with the specified `msg.value` and calldata, and a *minimum* amount of gas.\n    function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data) external;\n\n    /// Expect given number of calls to an address with the specified `msg.value` and calldata, and a *minimum* amount of gas.\n    function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data, uint64 count)\n        external;\n\n    /// Expects a call to an address with the specified calldata.\n    /// Calldata can either be a strict or a partial match.\n    function expectCall(address callee, bytes calldata data) external;\n\n    /// Expects given number of calls to an address with the specified calldata.\n    function expectCall(address callee, bytes calldata data, uint64 count) external;\n\n    /// Expects a call to an address with the specified `msg.value` and calldata.\n    function expectCall(address callee, uint256 msgValue, bytes calldata data) external;\n\n    /// Expects given number of calls to an address with the specified `msg.value` and calldata.\n    function expectCall(address callee, uint256 msgValue, bytes calldata data, uint64 count) external;\n\n    /// Expect a call to an address with the specified `msg.value`, gas, and calldata.\n    function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data) external;\n\n    /// Expects given number of calls to an address with the specified `msg.value`, gas, and calldata.\n    function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data, uint64 count) external;\n\n    /// Prepare an expected log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData.).\n    /// Call this function, then emit an event, then call a function. Internally after the call, we check if\n    /// logs were emitted in the expected order with the expected topics and data (as specified by the booleans).\n    function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData) external;\n\n    /// Same as the previous method, but also checks supplied address against emitting contract.\n    function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, address emitter)\n        external;\n\n    /// Prepare an expected log with all topic and data checks enabled.\n    /// Call this function, then emit an event, then call a function. Internally after the call, we check if\n    /// logs were emitted in the expected order with the expected topics and data.\n    function expectEmit() external;\n\n    /// Same as the previous method, but also checks supplied address against emitting contract.\n    function expectEmit(address emitter) external;\n\n    /// Expects an error on next call with any revert data.\n    function expectRevert() external;\n\n    /// Expects an error on next call that starts with the revert data.\n    function expectRevert(bytes4 revertData) external;\n\n    /// Expects an error on next call that exactly matches the revert data.\n    function expectRevert(bytes calldata revertData) external;\n\n    /// Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the current subcontext. If any other\n    /// memory is written to, the test will fail. Can be called multiple times to add more ranges to the set.\n    function expectSafeMemory(uint64 min, uint64 max) external;\n\n    /// Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the next created subcontext.\n    /// If any other memory is written to, the test will fail. Can be called multiple times to add more ranges\n    /// to the set.\n    function expectSafeMemoryCall(uint64 min, uint64 max) external;\n\n    /// Marks a test as skipped. Must be called at the top of the test.\n    function skip(bool skipTest) external;\n\n    /// Stops all safe memory expectation in the current subcontext.\n    function stopExpectSafeMemory() external;\n}\n"
      },
      "lib/aave-helpers/src/ChainIds.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\nimport {Vm} from 'forge-std/Vm.sol';\n\nlibrary ChainIds {\n  uint256 internal constant MAINNET = 1;\n  uint256 internal constant OPTIMISM = 10;\n  uint256 internal constant BNB = 56;\n  uint256 internal constant POLYGON = 137;\n  uint256 internal constant FANTOM = 250;\n  uint256 internal constant ZK_SYNC = 324;\n  uint256 internal constant METIS = 1088;\n  uint256 internal constant ZK_EVM = 1101;\n  uint256 internal constant BASE = 8453;\n  uint256 internal constant ARBITRUM = 42161;\n  uint256 internal constant AVALANCHE = 43114;\n  uint256 internal constant GNOSIS = 100;\n  uint256 internal constant SCROLL = 534352;\n  uint256 internal constant SEPOLIA = 11155111;\n  uint256 internal constant HARMONY = 1666600000;\n}\n\nlibrary ChainHelpers {\n  error UnknownChainId();\n\n  function selectChain(Vm vm, uint256 chainId) internal returns (uint256, uint256) {\n    uint256 previousFork = vm.activeFork();\n    if (chainId == block.chainid) return (previousFork, previousFork);\n    uint256 newFork;\n    if (chainId == ChainIds.MAINNET) {\n      newFork = vm.createSelectFork(vm.rpcUrl('mainnet'));\n    } else if (chainId == ChainIds.OPTIMISM) {\n      newFork = vm.createSelectFork(vm.rpcUrl('optimism'));\n    } else if (chainId == ChainIds.BNB) {\n      newFork = vm.createSelectFork(vm.rpcUrl('bnb'));\n    } else if (chainId == ChainIds.POLYGON) {\n      newFork = vm.createSelectFork(vm.rpcUrl('polygon'));\n    } else if (chainId == ChainIds.FANTOM) {\n      newFork = vm.createSelectFork(vm.rpcUrl('fantom'));\n    } else if (chainId == ChainIds.ZK_SYNC) {\n      newFork = vm.createSelectFork(vm.rpcUrl('zkSync'));\n    } else if (chainId == ChainIds.METIS) {\n      newFork = vm.createSelectFork(vm.rpcUrl('metis'));\n    } else if (chainId == ChainIds.ZK_EVM) {\n      newFork = vm.createSelectFork(vm.rpcUrl('zkEvm'));\n    } else if (chainId == ChainIds.BASE) {\n      newFork = vm.createSelectFork(vm.rpcUrl('base'));\n    } else if (chainId == ChainIds.GNOSIS) {\n      newFork = vm.createSelectFork(vm.rpcUrl('gnosis'));\n    } else if (chainId == ChainIds.SCROLL) {\n      newFork = vm.createSelectFork(vm.rpcUrl('scroll'));\n    } else if (chainId == ChainIds.ARBITRUM) {\n      newFork = vm.createSelectFork(vm.rpcUrl('arbitrum'));\n    } else if (chainId == ChainIds.AVALANCHE) {\n      newFork = vm.createSelectFork(vm.rpcUrl('avalanche'));\n    } else if (chainId == ChainIds.SEPOLIA) {\n      newFork = vm.createSelectFork(vm.rpcUrl('sepolia'));\n    } else if (chainId == ChainIds.HARMONY) {\n      newFork = vm.createSelectFork(vm.rpcUrl('harmony'));\n    } else {\n      revert UnknownChainId();\n    }\n    return (previousFork, newFork);\n  }\n}\n"
      },
      "lib/aave-helpers/src/interfaces/IProposalGenericExecutor.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/**\n * @dev Generic proposal interface allowing execution via MockExecutor\n */\ninterface IProposalGenericExecutor {\n  function execute() external;\n}\n"
      },
      "src/20240322_Multi_LayerZeroBridgeAdapterUpdateToV2/AaveV3Ethereum_LayerZeroBridgeAdapterUpdateToV2_20240322.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {BaseAdaptersUpdatePayload, ICrossChainForwarder} from './BaseAdaptersUpdatePayload.sol';\nimport {GovernanceV3Ethereum} from 'aave-address-book/GovernanceV3Ethereum.sol';\nimport {ChainIds} from 'aave-helpers/ChainIds.sol';\n\n/**\n * @title LayerZero bridge adapter update to V2\n * @author BGD Labs @bgdlabs\n * - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/29\n */\ncontract AaveV3Ethereum_LayerZeroBridgeAdapterUpdateToV2_20240322 is\n  BaseAdaptersUpdatePayload(\n    BaseAdaptersUpdatePayload.ConstructorInput({\n      ccc: GovernanceV3Ethereum.CROSS_CHAIN_CONTROLLER,\n      lzNewAdapter: 0x8410d9BD353b420ebA8C48ff1B0518426C280FCC,\n      lzAdapterToRemove: 0x2a323be63e08E08536Fc3b5d8C6f24825e68895e // this adapter is for communication for (eth -> avax, pol, bnb)\n    })\n  )\n{\n  // we define it here as its custom for this specific case (lz on eth -> gnosis communication. only forwarding)\n  address public constant LZ_FORWARDER_TO_REMOVE_GNOSIS =\n    0x1783DA119C35ED03e608f88cB9528Aba8174fFfc;\n\n  function getChainsToReceive() public pure override returns (uint256[] memory) {\n    uint256[] memory chains = new uint256[](2);\n    chains[0] = ChainIds.AVALANCHE;\n    chains[1] = ChainIds.POLYGON;\n    return chains;\n  }\n\n  function getDestinationAdapters()\n    public\n    pure\n    override\n    returns (DestinationAdaptersInput[] memory)\n  {\n    DestinationAdaptersInput[] memory destinationAdapters = new DestinationAdaptersInput[](4);\n\n    destinationAdapters[0].adapter = 0x10f02995a399C0dC0FaF29914220E9C1bCdE8640;\n    destinationAdapters[0].chainId = ChainIds.AVALANCHE;\n\n    destinationAdapters[1].adapter = 0x7FAE7765abB4c8f778d57337bB720d0BC53057e3;\n    destinationAdapters[1].chainId = ChainIds.POLYGON;\n\n    destinationAdapters[2].adapter = 0xa5cc218513305221201f196760E9e64e9D49d98A;\n    destinationAdapters[2].chainId = ChainIds.BNB;\n\n    destinationAdapters[3].adapter = 0x9b6f5ef589A3DD08670Dd146C11C4Fb33E04494F;\n    destinationAdapters[3].chainId = ChainIds.GNOSIS;\n\n    return destinationAdapters;\n  }\n\n  // we override this method, as in lz case, we have two lz adapters. the normal one that sends (to avax, pol, bnb) and receives (from avax and pol)\n  // and the adapter to send to gnosis\n  function getForwarderBridgeAdaptersToRemove()\n    public\n    view\n    override\n    returns (ICrossChainForwarder.BridgeAdapterToDisable[] memory)\n  {\n    ICrossChainForwarder.BridgeAdapterToDisable[]\n      memory forwarderAdaptersToRemove = new ICrossChainForwarder.BridgeAdapterToDisable[](2);\n\n    uint256[] memory chainIds = new uint256[](3);\n    chainIds[0] = ChainIds.POLYGON;\n    chainIds[1] = ChainIds.BNB;\n    chainIds[2] = ChainIds.AVALANCHE;\n\n    forwarderAdaptersToRemove[0] = ICrossChainForwarder.BridgeAdapterToDisable({\n      bridgeAdapter: LZ_ADAPTER_TO_REMOVE,\n      chainIds: chainIds\n    });\n    forwarderAdaptersToRemove[1] = ICrossChainForwarder.BridgeAdapterToDisable({\n      bridgeAdapter: LZ_FORWARDER_TO_REMOVE_GNOSIS,\n      chainIds: new uint256[](1)\n    });\n    forwarderAdaptersToRemove[1].chainIds[0] = ChainIds.GNOSIS;\n\n    return forwarderAdaptersToRemove;\n  }\n}\n"
      },
      "src/20240322_Multi_LayerZeroBridgeAdapterUpdateToV2/BaseAdaptersUpdatePayload.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {ICrossChainReceiver, ICrossChainForwarder} from 'aave-address-book/common/ICrossChainController.sol';\nimport {IProposalGenericExecutor} from 'aave-helpers/interfaces/IProposalGenericExecutor.sol';\n\n/**\n * @title Base payload aDI and bridge adapters update\n * @author BGD Labs @bgdlabs\n */\nabstract contract BaseAdaptersUpdatePayload is IProposalGenericExecutor {\n  struct ConstructorInput {\n    address ccc;\n    address lzAdapterToRemove;\n    address lzNewAdapter;\n  }\n  struct DestinationAdaptersInput {\n    address adapter;\n    uint256 chainId;\n  }\n\n  address public immutable CROSS_CHAIN_CONTROLLER;\n  address public immutable LZ_ADAPTER_TO_REMOVE;\n  address public immutable LZ_NEW_ADAPTER;\n\n  constructor(ConstructorInput memory constructorInput) {\n    CROSS_CHAIN_CONTROLLER = constructorInput.ccc;\n    LZ_ADAPTER_TO_REMOVE = constructorInput.lzAdapterToRemove;\n    LZ_NEW_ADAPTER = constructorInput.lzNewAdapter;\n  }\n\n  function execute() public override {\n    // remove old Receiver bridge adapter\n    ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[]\n      memory receiversToRemove = getReceiverBridgeAdaptersToRemove();\n    if (receiversToRemove.length != 0) {\n      ICrossChainReceiver(CROSS_CHAIN_CONTROLLER).disallowReceiverBridgeAdapters(receiversToRemove);\n    }\n\n    // remove forwarding adapters\n    ICrossChainForwarder.BridgeAdapterToDisable[]\n      memory forwardersToRemove = getForwarderBridgeAdaptersToRemove();\n    if (forwardersToRemove.length != 0) {\n      ICrossChainForwarder(CROSS_CHAIN_CONTROLLER).disableBridgeAdapters(forwardersToRemove);\n    }\n\n    ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[]\n      memory receiversToAllow = getReceiverBridgeAdaptersToAllow();\n    if (receiversToAllow.length != 0) {\n      // add receiver adapters\n      ICrossChainReceiver(CROSS_CHAIN_CONTROLLER).allowReceiverBridgeAdapters(receiversToAllow);\n    }\n    ICrossChainForwarder.ForwarderBridgeAdapterConfigInput[]\n      memory forwardersToEnable = getForwarderBridgeAdaptersToEnable();\n    if (forwardersToEnable.length != 0) {\n      // add forwarding adapters\n      ICrossChainForwarder(CROSS_CHAIN_CONTROLLER).enableBridgeAdapters(forwardersToEnable);\n    }\n  }\n\n  function getDestinationAdapters()\n    public\n    pure\n    virtual\n    returns (DestinationAdaptersInput[] memory)\n  {\n    DestinationAdaptersInput[] memory destinationAdapters;\n    return destinationAdapters;\n  }\n\n  function getChainsToReceive() public pure virtual returns (uint256[] memory);\n\n  function getChainsToSend() public pure returns (uint256[] memory) {\n    DestinationAdaptersInput[] memory destinationAdapters = getDestinationAdapters();\n    uint256[] memory chainsToSend = new uint256[](destinationAdapters.length);\n    for (uint256 i = 0; i < destinationAdapters.length; i++) {\n      chainsToSend[i] = destinationAdapters[i].chainId;\n    }\n    return chainsToSend;\n  }\n\n  function getReceiverBridgeAdaptersToRemove()\n    public\n    view\n    returns (ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[] memory)\n  {\n    // remove old Receiver bridge adapter\n    ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[]\n      memory bridgeAdaptersToRemove = new ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[](1);\n\n    bridgeAdaptersToRemove[0] = ICrossChainReceiver.ReceiverBridgeAdapterConfigInput({\n      bridgeAdapter: LZ_ADAPTER_TO_REMOVE,\n      chainIds: getChainsToReceive()\n    });\n\n    return bridgeAdaptersToRemove;\n  }\n\n  function getForwarderBridgeAdaptersToRemove()\n    public\n    view\n    virtual\n    returns (ICrossChainForwarder.BridgeAdapterToDisable[] memory)\n  {\n    ICrossChainForwarder.BridgeAdapterToDisable[]\n      memory forwarderAdaptersToRemove = new ICrossChainForwarder.BridgeAdapterToDisable[](1);\n\n    forwarderAdaptersToRemove[0] = ICrossChainForwarder.BridgeAdapterToDisable({\n      bridgeAdapter: LZ_ADAPTER_TO_REMOVE,\n      chainIds: getChainsToSend()\n    });\n\n    return forwarderAdaptersToRemove;\n  }\n\n  function getReceiverBridgeAdaptersToAllow()\n    public\n    view\n    returns (ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[] memory)\n  {\n    ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[]\n      memory bridgeAdapterConfig = new ICrossChainReceiver.ReceiverBridgeAdapterConfigInput[](1);\n\n    bridgeAdapterConfig[0] = ICrossChainReceiver.ReceiverBridgeAdapterConfigInput({\n      bridgeAdapter: LZ_NEW_ADAPTER,\n      chainIds: getChainsToReceive()\n    });\n\n    return bridgeAdapterConfig;\n  }\n\n  function getForwarderBridgeAdaptersToEnable()\n    public\n    view\n    returns (ICrossChainForwarder.ForwarderBridgeAdapterConfigInput[] memory)\n  {\n    DestinationAdaptersInput[] memory destinationAdapters = getDestinationAdapters();\n\n    ICrossChainForwarder.ForwarderBridgeAdapterConfigInput[]\n      memory bridgeAdaptersToEnable = new ICrossChainForwarder.ForwarderBridgeAdapterConfigInput[](\n        destinationAdapters.length\n      );\n\n    for (uint256 i = 0; i < destinationAdapters.length; i++) {\n      bridgeAdaptersToEnable[i] = ICrossChainForwarder.ForwarderBridgeAdapterConfigInput({\n        currentChainBridgeAdapter: LZ_NEW_ADAPTER,\n        destinationBridgeAdapter: destinationAdapters[i].adapter,\n        destinationChainId: destinationAdapters[i].chainId\n      });\n    }\n\n    return bridgeAdaptersToEnable;\n  }\n}\n"
      }
    },
    "settings": {
      "remappings": [
        "@aave/core-v3/=lib/aave-helpers/lib/aave-address-book/lib/aave-v3-core/",
        "@aave/periphery-v3/=lib/aave-helpers/lib/aave-address-book/lib/aave-v3-periphery/",
        "aave-address-book/=lib/aave-helpers/lib/aave-address-book/src/",
        "aave-helpers/=lib/aave-helpers/src/",
        "aave-v3-core/=lib/aave-helpers/lib/aave-address-book/lib/aave-v3-core/",
        "aave-v3-periphery/=lib/aave-helpers/lib/aave-address-book/lib/aave-v3-periphery/",
        "ds-test/=lib/aave-helpers/lib/forge-std/lib/ds-test/src/",
        "forge-std/=lib/aave-helpers/lib/forge-std/src/",
        "solidity-utils/=lib/aave-helpers/lib/solidity-utils/src/",
        "governance-crosschain-bridges/=lib/aave-helpers/lib/governance-crosschain-bridges/"
      ],
      "optimizer": {
        "enabled": true,
        "runs": 200
      },
      "metadata": {
        "useLiteralContent": false,
        "bytecodeHash": "none",
        "appendCBOR": true
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      },
      "evmVersion": "paris",
      "viaIR": false,
      "libraries": {}
    },
    "language": "Solidity"
  }}