{
  "name": "Homeira",
  "chain": {
    "name": "Robinhood Chain",
    "id": 4663,
    "rpc": "https://rpc.mainnet.chain.robinhood.com",
    "explorer": "https://robinhoodchain.blockscout.com"
  },
  "contracts": {
    "HomeiraGuardBook": {
      "address": null,
      "deployedBlock": null,
      "constructor": {
        "morpho": "0x9d53d5e3bd5e8d4cbfa6db1ca238aea02e651010"
      },
      "abi": [
        {
          "type": "constructor",
          "inputs": [
            {
              "name": "morpho",
              "type": "address",
              "internalType": "contract IMorphoBlueViews"
            }
          ],
          "stateMutability": "nonpayable"
        },
        {
          "type": "function",
          "name": "EXTERNAL_READ_GAS",
          "inputs": [],
          "outputs": [
            {
              "name": "",
              "type": "uint256",
              "internalType": "uint256"
            }
          ],
          "stateMutability": "view"
        },
        {
          "type": "function",
          "name": "MAX_GAP",
          "inputs": [],
          "outputs": [
            {
              "name": "",
              "type": "uint32",
              "internalType": "uint32"
            }
          ],
          "stateMutability": "view"
        },
        {
          "type": "function",
          "name": "MAX_TARGET_HF",
          "inputs": [],
          "outputs": [
            {
              "name": "",
              "type": "uint256",
              "internalType": "uint256"
            }
          ],
          "stateMutability": "view"
        },
        {
          "type": "function",
          "name": "MAX_URI_BYTES",
          "inputs": [],
          "outputs": [
            {
              "name": "",
              "type": "uint256",
              "internalType": "uint256"
            }
          ],
          "stateMutability": "view"
        },
        {
          "type": "function",
          "name": "MAX_WATCHERS",
          "inputs": [],
          "outputs": [
            {
              "name": "",
              "type": "uint8",
              "internalType": "uint8"
            }
          ],
          "stateMutability": "view"
        },
        {
          "type": "function",
          "name": "MIN_CRITICAL_HF",
          "inputs": [],
          "outputs": [
            {
              "name": "",
              "type": "uint256",
              "internalType": "uint256"
            }
          ],
          "stateMutability": "view"
        },
        {
          "type": "function",
          "name": "MIN_GAP",
          "inputs": [],
          "outputs": [
            {
              "name": "",
              "type": "uint32",
              "internalType": "uint32"
            }
          ],
          "stateMutability": "view"
        },
        {
          "type": "function",
          "name": "MORPHO",
          "inputs": [],
          "outputs": [
            {
              "name": "",
              "type": "address",
              "internalType": "contract IMorphoBlueViews"
            }
          ],
          "stateMutability": "view"
        },
        {
          "type": "function",
          "name": "acknowledge",
          "inputs": [
            {
              "name": "guardId",
              "type": "bytes32",
              "internalType": "bytes32"
            },
            {
              "name": "index",
              "type": "uint64",
              "internalType": "uint64"
            },
            {
              "name": "note",
              "type": "bytes32",
              "internalType": "bytes32"
            }
          ],
          "outputs": [],
          "stateMutability": "nonpayable"
        },
        {
          "type": "function",
          "name": "acknowledgement",
          "inputs": [
            {
              "name": "guardId",
              "type": "bytes32",
              "internalType": "bytes32"
            },
            {
              "name": "index",
              "type": "uint64",
              "internalType": "uint64"
            },
            {
              "name": "by",
              "type": "address",
              "internalType": "address"
            }
          ],
          "outputs": [
            {
              "name": "note",
              "type": "bytes32",
              "internalType": "bytes32"
            }
          ],
          "stateMutability": "view"
        },
        {
          "type": "function",
          "name": "checkpoint",
          "inputs": [
            {
              "name": "guardId",
              "type": "bytes32",
              "internalType": "bytes32"
            }
          ],
          "outputs": [
            {
              "name": "index",
              "type": "uint64",
              "internalType": "uint64"
            }
          ],
          "stateMutability": "nonpayable"
        },
        {
          "type": "function",
          "name": "checkpointCount",
          "inputs": [],
          "outputs": [
            {
              "name": "",
              "type": "uint256",
              "internalType": "uint256"
            }
          ],
          "stateMutability": "view"
        },
        {
          "type": "function",
          "name": "checkpointOf",
          "inputs": [
            {
              "name": "guardId",
              "type": "bytes32",
              "internalType": "bytes32"
            },
            {
              "name": "index",
              "type": "uint64",
              "internalType": "uint64"
            }
          ],
          "outputs": [
            {
              "name": "",
              "type": "tuple",
              "internalType": "struct HomeiraGuardBook.Checkpoint",
              "components": [
                {
                  "name": "time",
                  "type": "uint64",
                  "internalType": "uint64"
                },
                {
                  "name": "chainBlock",
                  "type": "uint64",
                  "internalType": "uint64"
                },
                {
                  "name": "level",
                  "type": "uint8",
                  "internalType": "enum HomeiraGuardBook.Level"
                },
                {
                  "name": "interestAccrued",
                  "type": "bool",
                  "internalType": "bool"
                },
                {
                  "name": "healthFactor",
                  "type": "uint128",
                  "internalType": "uint128"
                },
                {
                  "name": "price",
                  "type": "uint256",
                  "internalType": "uint256"
                },
                {
                  "name": "borrowAssets",
                  "type": "uint128",
                  "internalType": "uint128"
                },
                {
                  "name": "collateral",
                  "type": "uint128",
                  "internalType": "uint128"
                },
                {
                  "name": "recorder",
                  "type": "address",
                  "internalType": "address"
                }
              ]
            }
          ],
          "stateMutability": "view"
        },
        {
          "type": "function",
          "name": "guard",
          "inputs": [
            {
              "name": "guardId",
              "type": "bytes32",
              "internalType": "bytes32"
            }
          ],
          "outputs": [
            {
              "name": "",
              "type": "tuple",
              "internalType": "struct HomeiraGuardBook.Guard",
              "components": [
                {
                  "name": "borrower",
                  "type": "address",
                  "internalType": "address"
                },
                {
                  "name": "status",
                  "type": "uint8",
                  "internalType": "enum HomeiraGuardBook.Status"
                },
                {
                  "name": "version",
                  "type": "uint32",
                  "internalType": "uint32"
                },
                {
                  "name": "watcherCount",
                  "type": "uint8",
                  "internalType": "uint8"
                },
                {
                  "name": "checkpoints",
                  "type": "uint64",
                  "internalType": "uint64"
                },
                {
                  "name": "marketId",
                  "type": "bytes32",
                  "internalType": "bytes32"
                },
                {
                  "name": "rules",
                  "type": "tuple",
                  "internalType": "struct HomeiraGuardBook.Rules",
                  "components": [
                    {
                      "name": "warnHf",
                      "type": "uint128",
                      "internalType": "uint128"
                    },
                    {
                      "name": "criticalHf",
                      "type": "uint128",
                      "internalType": "uint128"
                    },
                    {
                      "name": "targetHf",
                      "type": "uint128",
                      "internalType": "uint128"
                    },
                    {
                      "name": "minGap",
                      "type": "uint32",
                      "internalType": "uint32"
                    }
                  ]
                },
                {
                  "name": "planHash",
                  "type": "bytes32",
                  "internalType": "bytes32"
                }
              ]
            }
          ],
          "stateMutability": "view"
        },
        {
          "type": "function",
          "name": "guardCount",
          "inputs": [],
          "outputs": [
            {
              "name": "",
              "type": "uint256",
              "internalType": "uint256"
            }
          ],
          "stateMutability": "view"
        },
        {
          "type": "function",
          "name": "guardIdOf",
          "inputs": [
            {
              "name": "borrower",
              "type": "address",
              "internalType": "address"
            },
            {
              "name": "marketId",
              "type": "bytes32",
              "internalType": "bytes32"
            }
          ],
          "outputs": [
            {
              "name": "",
              "type": "bytes32",
              "internalType": "bytes32"
            }
          ],
          "stateMutability": "pure"
        },
        {
          "type": "function",
          "name": "health",
          "inputs": [
            {
              "name": "borrower",
              "type": "address",
              "internalType": "address"
            },
            {
              "name": "marketId",
              "type": "bytes32",
              "internalType": "bytes32"
            }
          ],
          "outputs": [
            {
              "name": "r",
              "type": "tuple",
              "internalType": "struct HomeiraGuardBook.Reading",
              "components": [
                {
                  "name": "level",
                  "type": "uint8",
                  "internalType": "enum HomeiraGuardBook.Level"
                },
                {
                  "name": "interestAccrued",
                  "type": "bool",
                  "internalType": "bool"
                },
                {
                  "name": "healthFactor",
                  "type": "uint256",
                  "internalType": "uint256"
                },
                {
                  "name": "price",
                  "type": "uint256",
                  "internalType": "uint256"
                },
                {
                  "name": "borrowAssets",
                  "type": "uint256",
                  "internalType": "uint256"
                },
                {
                  "name": "collateral",
                  "type": "uint256",
                  "internalType": "uint256"
                },
                {
                  "name": "maxBorrow",
                  "type": "uint256",
                  "internalType": "uint256"
                },
                {
                  "name": "lltv",
                  "type": "uint256",
                  "internalType": "uint256"
                }
              ]
            }
          ],
          "stateMutability": "view"
        },
        {
          "type": "function",
          "name": "isWatcher",
          "inputs": [
            {
              "name": "guardId",
              "type": "bytes32",
              "internalType": "bytes32"
            },
            {
              "name": "watcher",
              "type": "address",
              "internalType": "address"
            }
          ],
          "outputs": [
            {
              "name": "",
              "type": "bool",
              "internalType": "bool"
            }
          ],
          "stateMutability": "view"
        },
        {
          "type": "function",
          "name": "open",
          "inputs": [
            {
              "name": "marketId",
              "type": "bytes32",
              "internalType": "bytes32"
            },
            {
              "name": "rules",
              "type": "tuple",
              "internalType": "struct HomeiraGuardBook.Rules",
              "components": [
                {
                  "name": "warnHf",
                  "type": "uint128",
                  "internalType": "uint128"
                },
                {
                  "name": "criticalHf",
                  "type": "uint128",
                  "internalType": "uint128"
                },
                {
                  "name": "targetHf",
                  "type": "uint128",
                  "internalType": "uint128"
                },
                {
                  "name": "minGap",
                  "type": "uint32",
                  "internalType": "uint32"
                }
              ]
            },
            {
              "name": "planHash",
              "type": "bytes32",
              "internalType": "bytes32"
            },
            {
              "name": "planUri",
              "type": "string",
              "internalType": "string"
            }
          ],
          "outputs": [
            {
              "name": "guardId",
              "type": "bytes32",
              "internalType": "bytes32"
            }
          ],
          "stateMutability": "nonpayable"
        },
        {
          "type": "function",
          "name": "pause",
          "inputs": [
            {
              "name": "guardId",
              "type": "bytes32",
              "internalType": "bytes32"
            }
          ],
          "outputs": [],
          "stateMutability": "nonpayable"
        },
        {
          "type": "function",
          "name": "preview",
          "inputs": [
            {
              "name": "guardId",
              "type": "bytes32",
              "internalType": "bytes32"
            }
          ],
          "outputs": [
            {
              "name": "r",
              "type": "tuple",
              "internalType": "struct HomeiraGuardBook.Reading",
              "components": [
                {
                  "name": "level",
                  "type": "uint8",
                  "internalType": "enum HomeiraGuardBook.Level"
                },
                {
                  "name": "interestAccrued",
                  "type": "bool",
                  "internalType": "bool"
                },
                {
                  "name": "healthFactor",
                  "type": "uint256",
                  "internalType": "uint256"
                },
                {
                  "name": "price",
                  "type": "uint256",
                  "internalType": "uint256"
                },
                {
                  "name": "borrowAssets",
                  "type": "uint256",
                  "internalType": "uint256"
                },
                {
                  "name": "collateral",
                  "type": "uint256",
                  "internalType": "uint256"
                },
                {
                  "name": "maxBorrow",
                  "type": "uint256",
                  "internalType": "uint256"
                },
                {
                  "name": "lltv",
                  "type": "uint256",
                  "internalType": "uint256"
                }
              ]
            }
          ],
          "stateMutability": "view"
        },
        {
          "type": "function",
          "name": "resume",
          "inputs": [
            {
              "name": "guardId",
              "type": "bytes32",
              "internalType": "bytes32"
            }
          ],
          "outputs": [],
          "stateMutability": "nonpayable"
        },
        {
          "type": "function",
          "name": "retire",
          "inputs": [
            {
              "name": "guardId",
              "type": "bytes32",
              "internalType": "bytes32"
            }
          ],
          "outputs": [],
          "stateMutability": "nonpayable"
        },
        {
          "type": "function",
          "name": "revise",
          "inputs": [
            {
              "name": "guardId",
              "type": "bytes32",
              "internalType": "bytes32"
            },
            {
              "name": "rules",
              "type": "tuple",
              "internalType": "struct HomeiraGuardBook.Rules",
              "components": [
                {
                  "name": "warnHf",
                  "type": "uint128",
                  "internalType": "uint128"
                },
                {
                  "name": "criticalHf",
                  "type": "uint128",
                  "internalType": "uint128"
                },
                {
                  "name": "targetHf",
                  "type": "uint128",
                  "internalType": "uint128"
                },
                {
                  "name": "minGap",
                  "type": "uint32",
                  "internalType": "uint32"
                }
              ]
            },
            {
              "name": "planHash",
              "type": "bytes32",
              "internalType": "bytes32"
            },
            {
              "name": "planUri",
              "type": "string",
              "internalType": "string"
            }
          ],
          "outputs": [],
          "stateMutability": "nonpayable"
        },
        {
          "type": "function",
          "name": "setWatcher",
          "inputs": [
            {
              "name": "guardId",
              "type": "bytes32",
              "internalType": "bytes32"
            },
            {
              "name": "watcher",
              "type": "address",
              "internalType": "address"
            },
            {
              "name": "allowed",
              "type": "bool",
              "internalType": "bool"
            }
          ],
          "outputs": [],
          "stateMutability": "nonpayable"
        },
        {
          "type": "function",
          "name": "versionOf",
          "inputs": [
            {
              "name": "guardId",
              "type": "bytes32",
              "internalType": "bytes32"
            },
            {
              "name": "version",
              "type": "uint32",
              "internalType": "uint32"
            }
          ],
          "outputs": [
            {
              "name": "",
              "type": "tuple",
              "internalType": "struct HomeiraGuardBook.Version",
              "components": [
                {
                  "name": "rules",
                  "type": "tuple",
                  "internalType": "struct HomeiraGuardBook.Rules",
                  "components": [
                    {
                      "name": "warnHf",
                      "type": "uint128",
                      "internalType": "uint128"
                    },
                    {
                      "name": "criticalHf",
                      "type": "uint128",
                      "internalType": "uint128"
                    },
                    {
                      "name": "targetHf",
                      "type": "uint128",
                      "internalType": "uint128"
                    },
                    {
                      "name": "minGap",
                      "type": "uint32",
                      "internalType": "uint32"
                    }
                  ]
                },
                {
                  "name": "planHash",
                  "type": "bytes32",
                  "internalType": "bytes32"
                },
                {
                  "name": "setAt",
                  "type": "uint64",
                  "internalType": "uint64"
                }
              ]
            }
          ],
          "stateMutability": "view"
        },
        {
          "type": "event",
          "name": "Acknowledged",
          "inputs": [
            {
              "name": "guardId",
              "type": "bytes32",
              "indexed": true,
              "internalType": "bytes32"
            },
            {
              "name": "index",
              "type": "uint64",
              "indexed": true,
              "internalType": "uint64"
            },
            {
              "name": "by",
              "type": "address",
              "indexed": true,
              "internalType": "address"
            },
            {
              "name": "note",
              "type": "bytes32",
              "indexed": false,
              "internalType": "bytes32"
            }
          ],
          "anonymous": false
        },
        {
          "type": "event",
          "name": "Breach",
          "inputs": [
            {
              "name": "guardId",
              "type": "bytes32",
              "indexed": true,
              "internalType": "bytes32"
            },
            {
              "name": "borrower",
              "type": "address",
              "indexed": true,
              "internalType": "address"
            },
            {
              "name": "level",
              "type": "uint8",
              "indexed": false,
              "internalType": "enum HomeiraGuardBook.Level"
            },
            {
              "name": "healthFactor",
              "type": "uint256",
              "indexed": false,
              "internalType": "uint256"
            },
            {
              "name": "index",
              "type": "uint64",
              "indexed": false,
              "internalType": "uint64"
            }
          ],
          "anonymous": false
        },
        {
          "type": "event",
          "name": "CheckpointRecorded",
          "inputs": [
            {
              "name": "guardId",
              "type": "bytes32",
              "indexed": true,
              "internalType": "bytes32"
            },
            {
              "name": "index",
              "type": "uint64",
              "indexed": true,
              "internalType": "uint64"
            },
            {
              "name": "level",
              "type": "uint8",
              "indexed": false,
              "internalType": "enum HomeiraGuardBook.Level"
            },
            {
              "name": "healthFactor",
              "type": "uint256",
              "indexed": false,
              "internalType": "uint256"
            },
            {
              "name": "price",
              "type": "uint256",
              "indexed": false,
              "internalType": "uint256"
            },
            {
              "name": "borrowAssets",
              "type": "uint256",
              "indexed": false,
              "internalType": "uint256"
            },
            {
              "name": "collateral",
              "type": "uint256",
              "indexed": false,
              "internalType": "uint256"
            },
            {
              "name": "interestAccrued",
              "type": "bool",
              "indexed": false,
              "internalType": "bool"
            },
            {
              "name": "recorder",
              "type": "address",
              "indexed": false,
              "internalType": "address"
            }
          ],
          "anonymous": false
        },
        {
          "type": "event",
          "name": "GuardOpened",
          "inputs": [
            {
              "name": "guardId",
              "type": "bytes32",
              "indexed": true,
              "internalType": "bytes32"
            },
            {
              "name": "borrower",
              "type": "address",
              "indexed": true,
              "internalType": "address"
            },
            {
              "name": "marketId",
              "type": "bytes32",
              "indexed": true,
              "internalType": "bytes32"
            }
          ],
          "anonymous": false
        },
        {
          "type": "event",
          "name": "LevelChanged",
          "inputs": [
            {
              "name": "guardId",
              "type": "bytes32",
              "indexed": true,
              "internalType": "bytes32"
            },
            {
              "name": "from",
              "type": "uint8",
              "indexed": false,
              "internalType": "enum HomeiraGuardBook.Level"
            },
            {
              "name": "to",
              "type": "uint8",
              "indexed": false,
              "internalType": "enum HomeiraGuardBook.Level"
            },
            {
              "name": "index",
              "type": "uint64",
              "indexed": true,
              "internalType": "uint64"
            }
          ],
          "anonymous": false
        },
        {
          "type": "event",
          "name": "RulesSet",
          "inputs": [
            {
              "name": "guardId",
              "type": "bytes32",
              "indexed": true,
              "internalType": "bytes32"
            },
            {
              "name": "version",
              "type": "uint32",
              "indexed": true,
              "internalType": "uint32"
            },
            {
              "name": "warnHf",
              "type": "uint128",
              "indexed": false,
              "internalType": "uint128"
            },
            {
              "name": "criticalHf",
              "type": "uint128",
              "indexed": false,
              "internalType": "uint128"
            },
            {
              "name": "targetHf",
              "type": "uint128",
              "indexed": false,
              "internalType": "uint128"
            },
            {
              "name": "minGap",
              "type": "uint32",
              "indexed": false,
              "internalType": "uint32"
            },
            {
              "name": "planHash",
              "type": "bytes32",
              "indexed": false,
              "internalType": "bytes32"
            },
            {
              "name": "planUri",
              "type": "string",
              "indexed": false,
              "internalType": "string"
            }
          ],
          "anonymous": false
        },
        {
          "type": "event",
          "name": "StatusChanged",
          "inputs": [
            {
              "name": "guardId",
              "type": "bytes32",
              "indexed": true,
              "internalType": "bytes32"
            },
            {
              "name": "from",
              "type": "uint8",
              "indexed": false,
              "internalType": "enum HomeiraGuardBook.Status"
            },
            {
              "name": "to",
              "type": "uint8",
              "indexed": false,
              "internalType": "enum HomeiraGuardBook.Status"
            }
          ],
          "anonymous": false
        },
        {
          "type": "event",
          "name": "WatcherSet",
          "inputs": [
            {
              "name": "guardId",
              "type": "bytes32",
              "indexed": true,
              "internalType": "bytes32"
            },
            {
              "name": "watcher",
              "type": "address",
              "indexed": true,
              "internalType": "address"
            },
            {
              "name": "allowed",
              "type": "bool",
              "indexed": false,
              "internalType": "bool"
            }
          ],
          "anonymous": false
        },
        {
          "type": "error",
          "name": "BadRules",
          "inputs": []
        },
        {
          "type": "error",
          "name": "GuardExists",
          "inputs": [
            {
              "name": "guardId",
              "type": "bytes32",
              "internalType": "bytes32"
            }
          ]
        },
        {
          "type": "error",
          "name": "NoChange",
          "inputs": []
        },
        {
          "type": "error",
          "name": "NoCheckpoint",
          "inputs": [
            {
              "name": "guardId",
              "type": "bytes32",
              "internalType": "bytes32"
            },
            {
              "name": "index",
              "type": "uint64",
              "internalType": "uint64"
            }
          ]
        },
        {
          "type": "error",
          "name": "NoGuard",
          "inputs": [
            {
              "name": "guardId",
              "type": "bytes32",
              "internalType": "bytes32"
            }
          ]
        },
        {
          "type": "error",
          "name": "NotBorrower",
          "inputs": [
            {
              "name": "guardId",
              "type": "bytes32",
              "internalType": "bytes32"
            },
            {
              "name": "caller",
              "type": "address",
              "internalType": "address"
            }
          ]
        },
        {
          "type": "error",
          "name": "NotWatcher",
          "inputs": [
            {
              "name": "guardId",
              "type": "bytes32",
              "internalType": "bytes32"
            },
            {
              "name": "caller",
              "type": "address",
              "internalType": "address"
            }
          ]
        },
        {
          "type": "error",
          "name": "NothingToAcknowledge",
          "inputs": [
            {
              "name": "guardId",
              "type": "bytes32",
              "internalType": "bytes32"
            },
            {
              "name": "index",
              "type": "uint64",
              "internalType": "uint64"
            }
          ]
        },
        {
          "type": "error",
          "name": "TooManyWatchers",
          "inputs": []
        },
        {
          "type": "error",
          "name": "TooSoon",
          "inputs": [
            {
              "name": "guardId",
              "type": "bytes32",
              "internalType": "bytes32"
            },
            {
              "name": "nextAt",
              "type": "uint64",
              "internalType": "uint64"
            }
          ]
        },
        {
          "type": "error",
          "name": "UnknownMarket",
          "inputs": [
            {
              "name": "marketId",
              "type": "bytes32",
              "internalType": "bytes32"
            }
          ]
        },
        {
          "type": "error",
          "name": "UriTooLong",
          "inputs": []
        },
        {
          "type": "error",
          "name": "WrongStatus",
          "inputs": [
            {
              "name": "guardId",
              "type": "bytes32",
              "internalType": "bytes32"
            },
            {
              "name": "status",
              "type": "uint8",
              "internalType": "enum HomeiraGuardBook.Status"
            }
          ]
        },
        {
          "type": "error",
          "name": "ZeroMorpho",
          "inputs": []
        },
        {
          "type": "error",
          "name": "ZeroNote",
          "inputs": []
        }
      ]
    }
  },
  "notes": "No owner, no admin, no fee. The book never holds funds; it reads Morpho Blue and records guard rules and checkpoints."
}