[
  {
    "name": "facets",
    "type": "function",
    "stateMutability": "pure",
    "inputs": [],
    "outputs": [
      {
        "type": "tuple[]",
        "components": [
          {
            "type": "address",
            "name": "facetAddress"
          },
          {
            "type": "bytes4[]",
            "name": "functionSelectors"
          }
        ]
      }
    ]
  },
  {
    "name": "facetFunctionSelectors",
    "type": "function",
    "stateMutability": "pure",
    "inputs": [
      {
        "type": "address",
        "name": "facet"
      }
    ],
    "outputs": [
      {
        "type": "bytes4[]",
        "name": "functionSelectors"
      }
    ]
  },
  {
    "name": "facetAddresses",
    "type": "function",
    "stateMutability": "pure",
    "inputs": [],
    "outputs": [
      {
        "type": "address[]",
        "name": "addresses"
      }
    ]
  },
  {
    "name": "facetAddress",
    "type": "function",
    "stateMutability": "pure",
    "inputs": [
      {
        "type": "bytes4",
        "name": "functionSelector"
      }
    ],
    "outputs": [
      {
        "type": "address"
      }
    ]
  },
  {
    "name": "emitDiamondCutEvent",
    "type": "function",
    "stateMutability": "nonpayable",
    "inputs": [],
    "outputs": [
      {
        "type": "bool"
      }
    ]
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "implementation",
        "type": "address"
      }
    ],
    "name": "ImplementationIsSterile",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "NoChange",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "contr",
        "type": "address"
      }
    ],
    "name": "NotAContract",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "addr",
        "type": "address"
      }
    ],
    "name": "NotNominated",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "addr",
        "type": "address"
      }
    ],
    "name": "Unauthorized",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "UpgradeSimulationFailed",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "ZeroAddress",
    "type": "error"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "address",
        "name": "oldOwner",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "address",
        "name": "newOwner",
        "type": "address"
      }
    ],
    "name": "OwnerChanged",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "address",
        "name": "newOwner",
        "type": "address"
      }
    ],
    "name": "OwnerNominated",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "self",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "address",
        "name": "implementation",
        "type": "address"
      }
    ],
    "name": "Upgraded",
    "type": "event"
  },
  {
    "inputs": [],
    "name": "acceptOwnership",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "getImplementation",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "newNominatedOwner",
        "type": "address"
      }
    ],
    "name": "nominateNewOwner",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "nominatedOwner",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "owner",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "renounceNomination",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "newImplementation",
        "type": "address"
      }
    ],
    "name": "simulateUpgradeTo",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "newImplementation",
        "type": "address"
      }
    ],
    "name": "upgradeTo",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "ValueAlreadyInSet",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "ValueNotInSet",
    "type": "error"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "bytes32",
        "name": "feature",
        "type": "bytes32"
      },
      {
        "indexed": false,
        "internalType": "bool",
        "name": "allowAll",
        "type": "bool"
      }
    ],
    "name": "FeatureFlagAllowAllSet",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "bytes32",
        "name": "feature",
        "type": "bytes32"
      },
      {
        "indexed": false,
        "internalType": "address",
        "name": "account",
        "type": "address"
      }
    ],
    "name": "FeatureFlagAllowlistAdded",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "bytes32",
        "name": "feature",
        "type": "bytes32"
      },
      {
        "indexed": false,
        "internalType": "address",
        "name": "account",
        "type": "address"
      }
    ],
    "name": "FeatureFlagAllowlistRemoved",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "bytes32",
        "name": "feature",
        "type": "bytes32"
      },
      {
        "indexed": false,
        "internalType": "address[]",
        "name": "deniers",
        "type": "address[]"
      }
    ],
    "name": "FeatureFlagDeniersReset",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "bytes32",
        "name": "feature",
        "type": "bytes32"
      },
      {
        "indexed": false,
        "internalType": "bool",
        "name": "denyAll",
        "type": "bool"
      }
    ],
    "name": "FeatureFlagDenyAllSet",
    "type": "event"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "feature",
        "type": "bytes32"
      },
      {
        "internalType": "address",
        "name": "account",
        "type": "address"
      }
    ],
    "name": "addToFeatureFlagAllowlist",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "feature",
        "type": "bytes32"
      }
    ],
    "name": "getDeniers",
    "outputs": [
      {
        "internalType": "address[]",
        "name": "",
        "type": "address[]"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "feature",
        "type": "bytes32"
      }
    ],
    "name": "getFeatureFlagAllowAll",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "feature",
        "type": "bytes32"
      }
    ],
    "name": "getFeatureFlagAllowlist",
    "outputs": [
      {
        "internalType": "address[]",
        "name": "",
        "type": "address[]"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "feature",
        "type": "bytes32"
      }
    ],
    "name": "getFeatureFlagDenyAll",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "feature",
        "type": "bytes32"
      },
      {
        "internalType": "address",
        "name": "account",
        "type": "address"
      }
    ],
    "name": "isFeatureAllowed",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "feature",
        "type": "bytes32"
      },
      {
        "internalType": "address",
        "name": "account",
        "type": "address"
      }
    ],
    "name": "removeFromFeatureFlagAllowlist",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "feature",
        "type": "bytes32"
      },
      {
        "internalType": "address[]",
        "name": "deniers",
        "type": "address[]"
      }
    ],
    "name": "setDeniers",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "feature",
        "type": "bytes32"
      },
      {
        "internalType": "bool",
        "name": "allowAll",
        "type": "bool"
      }
    ],
    "name": "setFeatureFlagAllowAll",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "feature",
        "type": "bytes32"
      },
      {
        "internalType": "bool",
        "name": "denyAll",
        "type": "bool"
      }
    ],
    "name": "setFeatureFlagDenyAll",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "which",
        "type": "bytes32"
      }
    ],
    "name": "FeatureUnavailable",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      }
    ],
    "name": "InvalidAccountId",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "permission",
        "type": "bytes32"
      }
    ],
    "name": "InvalidPermission",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "origin",
        "type": "address"
      }
    ],
    "name": "OnlyAccountTokenProxy",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "internalType": "bytes32",
        "name": "permission",
        "type": "bytes32"
      },
      {
        "internalType": "address",
        "name": "target",
        "type": "address"
      }
    ],
    "name": "PermissionDenied",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "internalType": "bytes32",
        "name": "permission",
        "type": "bytes32"
      },
      {
        "internalType": "address",
        "name": "user",
        "type": "address"
      }
    ],
    "name": "PermissionNotGranted",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "PositionOutOfBounds",
    "type": "error"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "owner",
        "type": "address"
      }
    ],
    "name": "AccountCreated",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "indexed": true,
        "internalType": "bytes32",
        "name": "permission",
        "type": "bytes32"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "user",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "address",
        "name": "sender",
        "type": "address"
      }
    ],
    "name": "PermissionGranted",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "indexed": true,
        "internalType": "bytes32",
        "name": "permission",
        "type": "bytes32"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "user",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "address",
        "name": "sender",
        "type": "address"
      }
    ],
    "name": "PermissionRevoked",
    "type": "event"
  },
  {
    "inputs": [],
    "name": "createAccount",
    "outputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "requestedAccountId",
        "type": "uint128"
      }
    ],
    "name": "createAccount",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      }
    ],
    "name": "getAccountLastInteraction",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      }
    ],
    "name": "getAccountOwner",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      }
    ],
    "name": "getAccountPermissions",
    "outputs": [
      {
        "components": [
          {
            "internalType": "address",
            "name": "user",
            "type": "address"
          },
          {
            "internalType": "bytes32[]",
            "name": "permissions",
            "type": "bytes32[]"
          }
        ],
        "internalType": "struct IAccountModule.AccountPermissions[]",
        "name": "accountPerms",
        "type": "tuple[]"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "getAccountTokenAddress",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "internalType": "bytes32",
        "name": "permission",
        "type": "bytes32"
      },
      {
        "internalType": "address",
        "name": "user",
        "type": "address"
      }
    ],
    "name": "grantPermission",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "internalType": "bytes32",
        "name": "permission",
        "type": "bytes32"
      },
      {
        "internalType": "address",
        "name": "user",
        "type": "address"
      }
    ],
    "name": "hasPermission",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "internalType": "bytes32",
        "name": "permission",
        "type": "bytes32"
      },
      {
        "internalType": "address",
        "name": "user",
        "type": "address"
      }
    ],
    "name": "isAuthorized",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "to",
        "type": "address"
      },
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      }
    ],
    "name": "notifyAccountTransfer",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "internalType": "bytes32",
        "name": "permission",
        "type": "bytes32"
      }
    ],
    "name": "renouncePermission",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "internalType": "bytes32",
        "name": "permission",
        "type": "bytes32"
      },
      {
        "internalType": "address",
        "name": "user",
        "type": "address"
      }
    ],
    "name": "revokePermission",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      }
    ],
    "name": "AccountNotFound",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "EmptyDistribution",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "EmptyRevertReason",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "bytes[]",
        "name": "errors",
        "type": "bytes[]"
      }
    ],
    "name": "Errors",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "collateralValue",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "debt",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "ratio",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "minRatio",
        "type": "uint256"
      }
    ],
    "name": "InsufficientCollateralRatio",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      }
    ],
    "name": "MarketNotFound",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "marketId",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "poolId",
        "type": "uint256"
      }
    ],
    "name": "NotFundedByPool",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "OverflowInt256ToInt128",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "OverflowInt256ToUint256",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "OverflowUint128ToInt128",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "OverflowUint256ToInt256",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "OverflowUint256ToUint128",
    "type": "error"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      },
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "int256",
        "name": "updatedDebt",
        "type": "int256"
      }
    ],
    "name": "DebtAssociated",
    "type": "event"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      },
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      }
    ],
    "name": "associateDebt",
    "outputs": [
      {
        "internalType": "int256",
        "name": "",
        "type": "int256"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "expected",
        "type": "bytes32"
      },
      {
        "internalType": "bytes32",
        "name": "actual",
        "type": "bytes32"
      }
    ],
    "name": "MismatchAssociatedSystemKind",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "id",
        "type": "bytes32"
      }
    ],
    "name": "MissingAssociatedSystem",
    "type": "error"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "bytes32",
        "name": "kind",
        "type": "bytes32"
      },
      {
        "indexed": true,
        "internalType": "bytes32",
        "name": "id",
        "type": "bytes32"
      },
      {
        "indexed": false,
        "internalType": "address",
        "name": "proxy",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "address",
        "name": "impl",
        "type": "address"
      }
    ],
    "name": "AssociatedSystemSet",
    "type": "event"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "id",
        "type": "bytes32"
      }
    ],
    "name": "getAssociatedSystem",
    "outputs": [
      {
        "internalType": "address",
        "name": "addr",
        "type": "address"
      },
      {
        "internalType": "bytes32",
        "name": "kind",
        "type": "bytes32"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "id",
        "type": "bytes32"
      },
      {
        "internalType": "string",
        "name": "name",
        "type": "string"
      },
      {
        "internalType": "string",
        "name": "symbol",
        "type": "string"
      },
      {
        "internalType": "string",
        "name": "uri",
        "type": "string"
      },
      {
        "internalType": "address",
        "name": "impl",
        "type": "address"
      }
    ],
    "name": "initOrUpgradeNft",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "id",
        "type": "bytes32"
      },
      {
        "internalType": "string",
        "name": "name",
        "type": "string"
      },
      {
        "internalType": "string",
        "name": "symbol",
        "type": "string"
      },
      {
        "internalType": "uint8",
        "name": "decimals",
        "type": "uint8"
      },
      {
        "internalType": "address",
        "name": "impl",
        "type": "address"
      }
    ],
    "name": "initOrUpgradeToken",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "id",
        "type": "bytes32"
      },
      {
        "internalType": "address",
        "name": "endpoint",
        "type": "address"
      }
    ],
    "name": "registerUnmanagedSystem",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "InvalidMessage",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "name": "NotCcipRouter",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "uint64",
        "name": "",
        "type": "uint64"
      }
    ],
    "name": "UnsupportedNetwork",
    "type": "error"
  },
  {
    "inputs": [
      {
        "components": [
          {
            "internalType": "bytes32",
            "name": "messageId",
            "type": "bytes32"
          },
          {
            "internalType": "uint64",
            "name": "sourceChainSelector",
            "type": "uint64"
          },
          {
            "internalType": "bytes",
            "name": "sender",
            "type": "bytes"
          },
          {
            "internalType": "bytes",
            "name": "data",
            "type": "bytes"
          },
          {
            "components": [
              {
                "internalType": "address",
                "name": "token",
                "type": "address"
              },
              {
                "internalType": "uint256",
                "name": "amount",
                "type": "uint256"
              }
            ],
            "internalType": "struct CcipClient.EVMTokenAmount[]",
            "name": "tokenAmounts",
            "type": "tuple[]"
          }
        ],
        "internalType": "struct CcipClient.Any2EVMMessage",
        "name": "message",
        "type": "tuple"
      }
    ],
    "name": "ccipReceive",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "internalType": "uint256",
        "name": "currentTime",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "requiredTime",
        "type": "uint256"
      }
    ],
    "name": "AccountActivityTimeoutPending",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      }
    ],
    "name": "CollateralDepositDisabled",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "CollateralNotFound",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "from",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "to",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "value",
        "type": "uint256"
      }
    ],
    "name": "FailedTransfer",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      }
    ],
    "name": "InsufficientAccountCollateral",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "required",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "existing",
        "type": "uint256"
      }
    ],
    "name": "InsufficientAllowance",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "amountAvailableForDelegationD18",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "amountD18",
        "type": "uint256"
      }
    ],
    "name": "InsufficientAvailableCollateral",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "string",
        "name": "parameter",
        "type": "string"
      },
      {
        "internalType": "string",
        "name": "reason",
        "type": "string"
      }
    ],
    "name": "InvalidParameter",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "OverflowUint256ToUint64",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "tokenAmount",
        "type": "uint256"
      },
      {
        "internalType": "uint8",
        "name": "decimals",
        "type": "uint8"
      }
    ],
    "name": "PrecisionLost",
    "type": "error"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "tokenAmount",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint64",
        "name": "expireTimestamp",
        "type": "uint64"
      }
    ],
    "name": "CollateralLockCreated",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "tokenAmount",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint64",
        "name": "expireTimestamp",
        "type": "uint64"
      }
    ],
    "name": "CollateralLockExpired",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "tokenAmount",
        "type": "uint256"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "sender",
        "type": "address"
      }
    ],
    "name": "Deposited",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "tokenAmount",
        "type": "uint256"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "sender",
        "type": "address"
      }
    ],
    "name": "Withdrawn",
    "type": "event"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "offset",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "count",
        "type": "uint256"
      }
    ],
    "name": "cleanExpiredLocks",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "cleared",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "remainingLockAmountD18",
        "type": "uint256"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      },
      {
        "internalType": "uint64",
        "name": "expireTimestamp",
        "type": "uint64"
      }
    ],
    "name": "createLock",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "tokenAmount",
        "type": "uint256"
      }
    ],
    "name": "deposit",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      }
    ],
    "name": "getAccountAvailableCollateral",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      }
    ],
    "name": "getAccountCollateral",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "totalDeposited",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "totalAssigned",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "totalLocked",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "offset",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "count",
        "type": "uint256"
      }
    ],
    "name": "getLocks",
    "outputs": [
      {
        "components": [
          {
            "internalType": "uint128",
            "name": "amountD18",
            "type": "uint128"
          },
          {
            "internalType": "uint64",
            "name": "lockExpirationTime",
            "type": "uint64"
          }
        ],
        "internalType": "struct CollateralLock.Data[]",
        "name": "locks",
        "type": "tuple[]"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "tokenAmount",
        "type": "uint256"
      }
    ],
    "name": "withdraw",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "components": [
          {
            "internalType": "bool",
            "name": "depositingEnabled",
            "type": "bool"
          },
          {
            "internalType": "uint256",
            "name": "issuanceRatioD18",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "liquidationRatioD18",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "liquidationRewardD18",
            "type": "uint256"
          },
          {
            "internalType": "bytes32",
            "name": "oracleNodeId",
            "type": "bytes32"
          },
          {
            "internalType": "address",
            "name": "tokenAddress",
            "type": "address"
          },
          {
            "internalType": "uint256",
            "name": "minDelegationD18",
            "type": "uint256"
          }
        ],
        "indexed": false,
        "internalType": "struct CollateralConfiguration.Data",
        "name": "config",
        "type": "tuple"
      }
    ],
    "name": "CollateralConfigured",
    "type": "event"
  },
  {
    "inputs": [
      {
        "components": [
          {
            "internalType": "bool",
            "name": "depositingEnabled",
            "type": "bool"
          },
          {
            "internalType": "uint256",
            "name": "issuanceRatioD18",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "liquidationRatioD18",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "liquidationRewardD18",
            "type": "uint256"
          },
          {
            "internalType": "bytes32",
            "name": "oracleNodeId",
            "type": "bytes32"
          },
          {
            "internalType": "address",
            "name": "tokenAddress",
            "type": "address"
          },
          {
            "internalType": "uint256",
            "name": "minDelegationD18",
            "type": "uint256"
          }
        ],
        "internalType": "struct CollateralConfiguration.Data",
        "name": "config",
        "type": "tuple"
      }
    ],
    "name": "configureCollateral",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      }
    ],
    "name": "getCollateralConfiguration",
    "outputs": [
      {
        "components": [
          {
            "internalType": "bool",
            "name": "depositingEnabled",
            "type": "bool"
          },
          {
            "internalType": "uint256",
            "name": "issuanceRatioD18",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "liquidationRatioD18",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "liquidationRewardD18",
            "type": "uint256"
          },
          {
            "internalType": "bytes32",
            "name": "oracleNodeId",
            "type": "bytes32"
          },
          {
            "internalType": "address",
            "name": "tokenAddress",
            "type": "address"
          },
          {
            "internalType": "uint256",
            "name": "minDelegationD18",
            "type": "uint256"
          }
        ],
        "internalType": "struct CollateralConfiguration.Data",
        "name": "",
        "type": "tuple"
      }
    ],
    "stateMutability": "pure",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bool",
        "name": "hideDisabled",
        "type": "bool"
      }
    ],
    "name": "getCollateralConfigurations",
    "outputs": [
      {
        "components": [
          {
            "internalType": "bool",
            "name": "depositingEnabled",
            "type": "bool"
          },
          {
            "internalType": "uint256",
            "name": "issuanceRatioD18",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "liquidationRatioD18",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "liquidationRewardD18",
            "type": "uint256"
          },
          {
            "internalType": "bytes32",
            "name": "oracleNodeId",
            "type": "bytes32"
          },
          {
            "internalType": "address",
            "name": "tokenAddress",
            "type": "address"
          },
          {
            "internalType": "uint256",
            "name": "minDelegationD18",
            "type": "uint256"
          }
        ],
        "internalType": "struct CollateralConfiguration.Data[]",
        "name": "",
        "type": "tuple[]"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      }
    ],
    "name": "getCollateralPrice",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "requiredAmount",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "availableAmount",
        "type": "uint256"
      }
    ],
    "name": "InsufficientCcipFee",
    "type": "error"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint64",
        "name": "destChainId",
        "type": "uint64"
      },
      {
        "indexed": true,
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "address",
        "name": "sender",
        "type": "address"
      }
    ],
    "name": "TransferCrossChainInitiated",
    "type": "event"
  },
  {
    "inputs": [
      {
        "internalType": "uint64",
        "name": "destChainId",
        "type": "uint64"
      },
      {
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      }
    ],
    "name": "transferCrossChain",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "gasTokenUsed",
        "type": "uint256"
      }
    ],
    "stateMutability": "payable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "int256",
        "name": "currentDebt",
        "type": "int256"
      }
    ],
    "name": "InsufficientDebt",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      }
    ],
    "name": "PoolNotFound",
    "type": "error"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "indexed": false,
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "sender",
        "type": "address"
      }
    ],
    "name": "UsdBurned",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "indexed": false,
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "sender",
        "type": "address"
      }
    ],
    "name": "UsdMinted",
    "type": "event"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      }
    ],
    "name": "burnUsd",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      }
    ],
    "name": "mintUsd",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "CannotScaleEmptyMapping",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "collateralValue",
        "type": "uint256"
      },
      {
        "internalType": "int256",
        "name": "debt",
        "type": "int256"
      },
      {
        "internalType": "uint256",
        "name": "currentCRatio",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "cratio",
        "type": "uint256"
      }
    ],
    "name": "IneligibleForLiquidation",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "InsufficientMappedAmount",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "MustBeVaultLiquidated",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "OverflowInt128ToUint128",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "OverflowUint256ToUint32",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "OverflowUint32ToInt32",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "OverflowUint64ToInt64",
    "type": "error"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "components": [
          {
            "internalType": "uint256",
            "name": "debtLiquidated",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "collateralLiquidated",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "amountRewarded",
            "type": "uint256"
          }
        ],
        "indexed": false,
        "internalType": "struct ILiquidationModule.LiquidationData",
        "name": "liquidationData",
        "type": "tuple"
      },
      {
        "indexed": false,
        "internalType": "uint128",
        "name": "liquidateAsAccountId",
        "type": "uint128"
      },
      {
        "indexed": false,
        "internalType": "address",
        "name": "sender",
        "type": "address"
      }
    ],
    "name": "Liquidation",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "components": [
          {
            "internalType": "uint256",
            "name": "debtLiquidated",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "collateralLiquidated",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "amountRewarded",
            "type": "uint256"
          }
        ],
        "indexed": false,
        "internalType": "struct ILiquidationModule.LiquidationData",
        "name": "liquidationData",
        "type": "tuple"
      },
      {
        "indexed": false,
        "internalType": "uint128",
        "name": "liquidateAsAccountId",
        "type": "uint128"
      },
      {
        "indexed": false,
        "internalType": "address",
        "name": "sender",
        "type": "address"
      }
    ],
    "name": "VaultLiquidation",
    "type": "event"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      }
    ],
    "name": "isPositionLiquidatable",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      }
    ],
    "name": "isVaultLiquidatable",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "internalType": "uint128",
        "name": "liquidateAsAccountId",
        "type": "uint128"
      }
    ],
    "name": "liquidate",
    "outputs": [
      {
        "components": [
          {
            "internalType": "uint256",
            "name": "debtLiquidated",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "collateralLiquidated",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "amountRewarded",
            "type": "uint256"
          }
        ],
        "internalType": "struct ILiquidationModule.LiquidationData",
        "name": "liquidationData",
        "type": "tuple"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      }
    ],
    "name": "liquidateToTreasury",
    "outputs": [
      {
        "components": [
          {
            "internalType": "uint256",
            "name": "debtLiquidated",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "collateralLiquidated",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "amountRewarded",
            "type": "uint256"
          }
        ],
        "internalType": "struct ILiquidationModule.LiquidationData",
        "name": "liquidationData",
        "type": "tuple"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "internalType": "uint128",
        "name": "liquidateAsAccountId",
        "type": "uint128"
      },
      {
        "internalType": "uint256",
        "name": "maxUsd",
        "type": "uint256"
      }
    ],
    "name": "liquidateVault",
    "outputs": [
      {
        "components": [
          {
            "internalType": "uint256",
            "name": "debtLiquidated",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "collateralLiquidated",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "amountRewarded",
            "type": "uint256"
          }
        ],
        "internalType": "struct ILiquidationModule.LiquidationData",
        "name": "liquidationData",
        "type": "tuple"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "tokenAmountToDeposit",
        "type": "uint256"
      }
    ],
    "name": "InsufficientMarketCollateralDepositable",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "tokenAmountToWithdraw",
        "type": "uint256"
      }
    ],
    "name": "InsufficientMarketCollateralWithdrawable",
    "type": "error"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "tokenAmount",
        "type": "uint256"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "sender",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "int128",
        "name": "creditCapacity",
        "type": "int128"
      },
      {
        "indexed": false,
        "internalType": "int128",
        "name": "netIssuance",
        "type": "int128"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "depositedCollateralValue",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "reportedDebt",
        "type": "uint256"
      }
    ],
    "name": "MarketCollateralDeposited",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "tokenAmount",
        "type": "uint256"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "sender",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "int128",
        "name": "creditCapacity",
        "type": "int128"
      },
      {
        "indexed": false,
        "internalType": "int128",
        "name": "netIssuance",
        "type": "int128"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "depositedCollateralValue",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "reportedDebt",
        "type": "uint256"
      }
    ],
    "name": "MarketCollateralWithdrawn",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "systemAmount",
        "type": "uint256"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "owner",
        "type": "address"
      }
    ],
    "name": "MaximumMarketCollateralConfigured",
    "type": "event"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      }
    ],
    "name": "configureMaximumMarketCollateral",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "tokenAmount",
        "type": "uint256"
      }
    ],
    "name": "depositMarketCollateral",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      }
    ],
    "name": "getMarketCollateralAmount",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "collateralAmountD18",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      }
    ],
    "name": "getMarketCollateralValue",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      }
    ],
    "name": "getMaximumMarketCollateral",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "tokenAmount",
        "type": "uint256"
      }
    ],
    "name": "withdrawMarketCollateral",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "market",
        "type": "address"
      }
    ],
    "name": "IncorrectMarketInterface",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      },
      {
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      }
    ],
    "name": "NotEnoughLiquidity",
    "type": "error"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "market",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "sender",
        "type": "address"
      }
    ],
    "name": "MarketRegistered",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "target",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "market",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "int128",
        "name": "creditCapacity",
        "type": "int128"
      },
      {
        "indexed": false,
        "internalType": "int128",
        "name": "netIssuance",
        "type": "int128"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "depositedCollateralValue",
        "type": "uint256"
      }
    ],
    "name": "MarketUsdDeposited",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "target",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "market",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "int128",
        "name": "creditCapacity",
        "type": "int128"
      },
      {
        "indexed": false,
        "internalType": "int128",
        "name": "netIssuance",
        "type": "int128"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "depositedCollateralValue",
        "type": "uint256"
      }
    ],
    "name": "MarketUsdWithdrawn",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "minLiquidityRatio",
        "type": "uint256"
      }
    ],
    "name": "SetMarketMinLiquidityRatio",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      },
      {
        "indexed": false,
        "internalType": "uint32",
        "name": "minDelegateTime",
        "type": "uint32"
      }
    ],
    "name": "SetMinDelegateTime",
    "type": "event"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "target",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      }
    ],
    "name": "depositMarketUsd",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "feeAmount",
        "type": "uint256"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      },
      {
        "internalType": "uint256",
        "name": "maxIter",
        "type": "uint256"
      }
    ],
    "name": "distributeDebtToPools",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      }
    ],
    "name": "getMarketAddress",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      },
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      }
    ],
    "name": "getMarketCapacityContributionFromPool",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      }
    ],
    "name": "getMarketCollateral",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      }
    ],
    "name": "getMarketDebtPerShare",
    "outputs": [
      {
        "internalType": "int256",
        "name": "",
        "type": "int256"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "",
        "type": "uint128"
      },
      {
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      }
    ],
    "name": "getMarketFees",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "depositFeeAmount",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "withdrawFeeAmount",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      }
    ],
    "name": "getMarketMinDelegateTime",
    "outputs": [
      {
        "internalType": "uint32",
        "name": "",
        "type": "uint32"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      }
    ],
    "name": "getMarketNetIssuance",
    "outputs": [
      {
        "internalType": "int128",
        "name": "",
        "type": "int128"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      },
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      }
    ],
    "name": "getMarketPoolDebtDistribution",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "sharesD18",
        "type": "uint256"
      },
      {
        "internalType": "uint128",
        "name": "totalSharesD18",
        "type": "uint128"
      },
      {
        "internalType": "int128",
        "name": "valuePerShareD27",
        "type": "int128"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      },
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      }
    ],
    "name": "getMarketPoolMaxDebtPerShare",
    "outputs": [
      {
        "internalType": "int256",
        "name": "",
        "type": "int256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      }
    ],
    "name": "getMarketPools",
    "outputs": [
      {
        "internalType": "uint128[]",
        "name": "inRangePoolIds",
        "type": "uint128[]"
      },
      {
        "internalType": "uint128[]",
        "name": "outRangePoolIds",
        "type": "uint128[]"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      }
    ],
    "name": "getMarketReportedDebt",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      }
    ],
    "name": "getMarketTotalDebt",
    "outputs": [
      {
        "internalType": "int256",
        "name": "",
        "type": "int256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      }
    ],
    "name": "getMinLiquidityRatio",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "getOracleManager",
    "outputs": [
      {
        "internalType": "contract IOracleManager",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "getUsdToken",
    "outputs": [
      {
        "internalType": "contract IERC20",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      }
    ],
    "name": "getWithdrawableMarketUsd",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      }
    ],
    "name": "isMarketCapacityLocked",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "market",
        "type": "address"
      }
    ],
    "name": "registerMarket",
    "outputs": [
      {
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      },
      {
        "internalType": "uint32",
        "name": "minDelegateTime",
        "type": "uint32"
      }
    ],
    "name": "setMarketMinDelegateTime",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      },
      {
        "internalType": "uint256",
        "name": "minLiquidityRatio",
        "type": "uint256"
      }
    ],
    "name": "setMinLiquidityRatio",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "marketId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "target",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      }
    ],
    "name": "withdrawMarketUsd",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "feeAmount",
        "type": "uint256"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "poolId",
        "type": "uint256"
      }
    ],
    "name": "PoolApprovedAdded",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "poolId",
        "type": "uint256"
      }
    ],
    "name": "PoolApprovedRemoved",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "poolId",
        "type": "uint256"
      }
    ],
    "name": "PreferredPoolSet",
    "type": "event"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      }
    ],
    "name": "addApprovedPool",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "getApprovedPools",
    "outputs": [
      {
        "internalType": "uint256[]",
        "name": "",
        "type": "uint256[]"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "getPreferredPool",
    "outputs": [
      {
        "internalType": "uint128",
        "name": "",
        "type": "uint128"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      }
    ],
    "name": "removeApprovedPool",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      }
    ],
    "name": "setPreferredPool",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "marketId",
        "type": "uint256"
      }
    ],
    "name": "CapacityLocked",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "uint32",
        "name": "timeRemaining",
        "type": "uint32"
      }
    ],
    "name": "MinDelegationTimeoutPending",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      }
    ],
    "name": "PoolAlreadyExists",
    "type": "error"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "indexed": false,
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "components": [
          {
            "internalType": "uint256",
            "name": "collateralLimitD18",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "issuanceRatioD18",
            "type": "uint256"
          }
        ],
        "indexed": false,
        "internalType": "struct PoolCollateralConfiguration.Data",
        "name": "config",
        "type": "tuple"
      }
    ],
    "name": "PoolCollateralConfigurationUpdated",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "indexed": false,
        "internalType": "bool",
        "name": "disabled",
        "type": "bool"
      }
    ],
    "name": "PoolCollateralDisabledByDefaultSet",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "components": [
          {
            "internalType": "uint128",
            "name": "marketId",
            "type": "uint128"
          },
          {
            "internalType": "uint128",
            "name": "weightD18",
            "type": "uint128"
          },
          {
            "internalType": "int128",
            "name": "maxDebtShareValueD18",
            "type": "int128"
          }
        ],
        "indexed": false,
        "internalType": "struct MarketConfiguration.Data[]",
        "name": "markets",
        "type": "tuple[]"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "sender",
        "type": "address"
      }
    ],
    "name": "PoolConfigurationSet",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "owner",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "sender",
        "type": "address"
      }
    ],
    "name": "PoolCreated",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "indexed": false,
        "internalType": "string",
        "name": "name",
        "type": "string"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "sender",
        "type": "address"
      }
    ],
    "name": "PoolNameUpdated",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "owner",
        "type": "address"
      }
    ],
    "name": "PoolNominationRenounced",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "owner",
        "type": "address"
      }
    ],
    "name": "PoolNominationRevoked",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "nominatedOwner",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "owner",
        "type": "address"
      }
    ],
    "name": "PoolOwnerNominated",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "owner",
        "type": "address"
      }
    ],
    "name": "PoolOwnershipAccepted",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "owner",
        "type": "address"
      }
    ],
    "name": "PoolOwnershipRenounced",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "minLiquidityRatio",
        "type": "uint256"
      }
    ],
    "name": "SetMinLiquidityRatio",
    "type": "event"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      }
    ],
    "name": "acceptPoolOwnership",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "requestedPoolId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "owner",
        "type": "address"
      }
    ],
    "name": "createPool",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "getMinLiquidityRatio",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      }
    ],
    "name": "getNominatedPoolOwner",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      }
    ],
    "name": "getPoolCollateralConfiguration",
    "outputs": [
      {
        "components": [
          {
            "internalType": "uint256",
            "name": "collateralLimitD18",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "issuanceRatioD18",
            "type": "uint256"
          }
        ],
        "internalType": "struct PoolCollateralConfiguration.Data",
        "name": "config",
        "type": "tuple"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateral",
        "type": "address"
      }
    ],
    "name": "getPoolCollateralIssuanceRatio",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      }
    ],
    "name": "getPoolConfiguration",
    "outputs": [
      {
        "components": [
          {
            "internalType": "uint128",
            "name": "marketId",
            "type": "uint128"
          },
          {
            "internalType": "uint128",
            "name": "weightD18",
            "type": "uint128"
          },
          {
            "internalType": "int128",
            "name": "maxDebtShareValueD18",
            "type": "int128"
          }
        ],
        "internalType": "struct MarketConfiguration.Data[]",
        "name": "",
        "type": "tuple[]"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      }
    ],
    "name": "getPoolDebtPerShare",
    "outputs": [
      {
        "internalType": "int256",
        "name": "debtPerShareD18",
        "type": "int256"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      }
    ],
    "name": "getPoolName",
    "outputs": [
      {
        "internalType": "string",
        "name": "poolName",
        "type": "string"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      }
    ],
    "name": "getPoolOwner",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      }
    ],
    "name": "getPoolTotalDebt",
    "outputs": [
      {
        "internalType": "int256",
        "name": "totalDebtD18",
        "type": "int256"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "nominatedOwner",
        "type": "address"
      },
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      }
    ],
    "name": "nominatePoolOwner",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "optionalCollateralType",
        "type": "address"
      }
    ],
    "name": "rebalancePool",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      }
    ],
    "name": "renouncePoolNomination",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      }
    ],
    "name": "renouncePoolOwnership",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      }
    ],
    "name": "revokePoolNomination",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "minLiquidityRatio",
        "type": "uint256"
      }
    ],
    "name": "setMinLiquidityRatio",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "components": [
          {
            "internalType": "uint256",
            "name": "collateralLimitD18",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "issuanceRatioD18",
            "type": "uint256"
          }
        ],
        "internalType": "struct PoolCollateralConfiguration.Data",
        "name": "newConfig",
        "type": "tuple"
      }
    ],
    "name": "setPoolCollateralConfiguration",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "bool",
        "name": "disabled",
        "type": "bool"
      }
    ],
    "name": "setPoolCollateralDisabledByDefault",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "components": [
          {
            "internalType": "uint128",
            "name": "marketId",
            "type": "uint128"
          },
          {
            "internalType": "uint128",
            "name": "weightD18",
            "type": "uint128"
          },
          {
            "internalType": "int128",
            "name": "maxDebtShareValueD18",
            "type": "int128"
          }
        ],
        "internalType": "struct MarketConfiguration.Data[]",
        "name": "newMarketConfigurations",
        "type": "tuple[]"
      }
    ],
    "name": "setPoolConfiguration",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "string",
        "name": "name",
        "type": "string"
      }
    ],
    "name": "setPoolName",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "distributor",
        "type": "address"
      }
    ],
    "name": "RewardUnavailable",
    "type": "error"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "address",
        "name": "distributor",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      }
    ],
    "name": "RewardsClaimed",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "address",
        "name": "distributor",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "start",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "duration",
        "type": "uint256"
      }
    ],
    "name": "RewardsDistributed",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "distributor",
        "type": "address"
      }
    ],
    "name": "RewardsDistributorRegistered",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "distributor",
        "type": "address"
      }
    ],
    "name": "RewardsDistributorRemoved",
    "type": "event"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "distributor",
        "type": "address"
      }
    ],
    "name": "claimPoolRewards",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "distributor",
        "type": "address"
      }
    ],
    "name": "claimRewards",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      },
      {
        "internalType": "uint64",
        "name": "start",
        "type": "uint64"
      },
      {
        "internalType": "uint32",
        "name": "duration",
        "type": "uint32"
      }
    ],
    "name": "distributeRewards",
    "outputs": [
      {
        "internalType": "int256",
        "name": "",
        "type": "int256"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "rewardsDistributor",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      },
      {
        "internalType": "uint64",
        "name": "start",
        "type": "uint64"
      },
      {
        "internalType": "uint32",
        "name": "duration",
        "type": "uint32"
      }
    ],
    "name": "distributeRewardsByOwner",
    "outputs": [
      {
        "internalType": "int256",
        "name": "",
        "type": "int256"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "distributor",
        "type": "address"
      }
    ],
    "name": "getAvailablePoolRewards",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "distributor",
        "type": "address"
      }
    ],
    "name": "getAvailableRewards",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "distributor",
        "type": "address"
      }
    ],
    "name": "getRewardRate",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "distributor",
        "type": "address"
      }
    ],
    "name": "registerRewardsDistributor",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "distributor",
        "type": "address"
      }
    ],
    "name": "removeRewardsDistributor",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      }
    ],
    "name": "updateRewards",
    "outputs": [
      {
        "internalType": "uint256[]",
        "name": "",
        "type": "uint256[]"
      },
      {
        "internalType": "address[]",
        "name": "",
        "type": "address[]"
      },
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "bytes32",
        "name": "k",
        "type": "bytes32"
      },
      {
        "indexed": false,
        "internalType": "bytes32",
        "name": "v",
        "type": "bytes32"
      }
    ],
    "name": "ConfigSet",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "uint64",
        "name": "newChainId",
        "type": "uint64"
      }
    ],
    "name": "NewSupportedCrossChainNetwork",
    "type": "event"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "ccipRouter",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "ccipTokenPool",
        "type": "address"
      }
    ],
    "name": "configureChainlinkCrossChain",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "oracleManagerAddress",
        "type": "address"
      }
    ],
    "name": "configureOracleManager",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "k",
        "type": "bytes32"
      }
    ],
    "name": "getConfig",
    "outputs": [
      {
        "internalType": "bytes32",
        "name": "v",
        "type": "bytes32"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "k",
        "type": "bytes32"
      }
    ],
    "name": "getConfigAddress",
    "outputs": [
      {
        "internalType": "address",
        "name": "v",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "k",
        "type": "bytes32"
      }
    ],
    "name": "getConfigUint",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "v",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "getTrustedForwarder",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "pure",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "forwarder",
        "type": "address"
      }
    ],
    "name": "isTrustedForwarder",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "pure",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "k",
        "type": "bytes32"
      },
      {
        "internalType": "bytes32",
        "name": "v",
        "type": "bytes32"
      }
    ],
    "name": "setConfig",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint64[]",
        "name": "supportedNetworks",
        "type": "uint64[]"
      },
      {
        "internalType": "uint64[]",
        "name": "ccipSelectors",
        "type": "uint64[]"
      }
    ],
    "name": "setSupportedCrossChainNetworks",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "numRegistered",
        "type": "uint256"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes4",
        "name": "interfaceId",
        "type": "bytes4"
      }
    ],
    "name": "supportsInterface",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "minDelegation",
        "type": "uint256"
      }
    ],
    "name": "InsufficientDelegation",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      }
    ],
    "name": "InsufficientVaultCollateralRatio",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "InvalidCollateralAmount",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "leverage",
        "type": "uint256"
      }
    ],
    "name": "InvalidLeverage",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "currentCollateral",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "maxCollateral",
        "type": "uint256"
      }
    ],
    "name": "PoolCollateralLimitExceeded",
    "type": "error"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "indexed": true,
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "indexed": false,
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "leverage",
        "type": "uint256"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "sender",
        "type": "address"
      }
    ],
    "name": "DelegationUpdated",
    "type": "event"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "newCollateralAmountD18",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "leverage",
        "type": "uint256"
      }
    ],
    "name": "delegateCollateral",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      }
    ],
    "name": "getLastDelegationTime",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "lastDelegationTime",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      }
    ],
    "name": "getPosition",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "collateralAmount",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "collateralValue",
        "type": "uint256"
      },
      {
        "internalType": "int256",
        "name": "debt",
        "type": "int256"
      },
      {
        "internalType": "uint256",
        "name": "collateralizationRatio",
        "type": "uint256"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      }
    ],
    "name": "getPositionCollateral",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      }
    ],
    "name": "getPositionCollateralRatio",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      }
    ],
    "name": "getPositionDebt",
    "outputs": [
      {
        "internalType": "int256",
        "name": "debt",
        "type": "int256"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      }
    ],
    "name": "getVaultCollateral",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "value",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      }
    ],
    "name": "getVaultCollateralRatio",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "poolId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      }
    ],
    "name": "getVaultDebt",
    "outputs": [
      {
        "internalType": "int256",
        "name": "",
        "type": "int256"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint128",
        "name": "accountId",
        "type": "uint128"
      },
      {
        "internalType": "uint128",
        "name": "oldPoolId",
        "type": "uint128"
      },
      {
        "internalType": "address",
        "name": "collateralType",
        "type": "address"
      },
      {
        "internalType": "uint128",
        "name": "newPoolId",
        "type": "uint128"
      }
    ],
    "name": "migrateDelegation",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  }
]