[
 {
  "type": "constructor",
  "inputs": [
   {
    "name": "timelock_",
    "type": "address",
    "internalType": "address"
   },
   {
    "name": "admin_",
    "type": "address",
    "internalType": "address"
   }
  ],
  "stateMutability": "nonpayable"
 },
 {
  "type": "function",
  "name": "admin",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "address",
    "internalType": "address"
   }
  ],
  "stateMutability": "view"
 },
 {
  "type": "function",
  "name": "effectiveTerms",
  "inputs": [
   {
    "name": "assetId",
    "type": "bytes32",
    "internalType": "bytes32"
   }
  ],
  "outputs": [
   {
    "name": "carryLTV",
    "type": "uint64",
    "internalType": "uint64"
   },
   {
    "name": "sessionMaxLTV",
    "type": "uint64",
    "internalType": "uint64"
   },
   {
    "name": "creditMark",
    "type": "uint128",
    "internalType": "uint128"
   },
   {
    "name": "regime",
    "type": "uint16",
    "internalType": "uint16"
   },
   {
    "name": "usable",
    "type": "bool",
    "internalType": "bool"
   }
  ],
  "stateMutability": "view"
 },
 {
  "type": "function",
  "name": "eip712Domain",
  "inputs": [],
  "outputs": [
   {
    "name": "fields",
    "type": "bytes1",
    "internalType": "bytes1"
   },
   {
    "name": "name",
    "type": "string",
    "internalType": "string"
   },
   {
    "name": "version",
    "type": "string",
    "internalType": "string"
   },
   {
    "name": "chainId",
    "type": "uint256",
    "internalType": "uint256"
   },
   {
    "name": "verifyingContract",
    "type": "address",
    "internalType": "address"
   },
   {
    "name": "salt",
    "type": "bytes32",
    "internalType": "bytes32"
   },
   {
    "name": "extensions",
    "type": "uint256[]",
    "internalType": "uint256[]"
   }
  ],
  "stateMutability": "view"
 },
 {
  "type": "function",
  "name": "guardrails",
  "inputs": [
   {
    "name": "assetId",
    "type": "bytes32",
    "internalType": "bytes32"
   }
  ],
  "outputs": [
   {
    "name": "",
    "type": "tuple",
    "internalType": "struct KerbTerms.Guardrails",
    "components": [
     {
      "name": "ltvMin",
      "type": "uint64",
      "internalType": "uint64"
     },
     {
      "name": "ltvMax",
      "type": "uint64",
      "internalType": "uint64"
     },
     {
      "name": "ceilingMin",
      "type": "uint128",
      "internalType": "uint128"
     },
     {
      "name": "ceilingMax",
      "type": "uint128",
      "internalType": "uint128"
     },
     {
      "name": "maxLoosenStepBps",
      "type": "uint64",
      "internalType": "uint64"
     },
     {
      "name": "loosenCooldownSec",
      "type": "uint32",
      "internalType": "uint32"
     },
     {
      "name": "maxReportAgeSec",
      "type": "uint32",
      "internalType": "uint32"
     },
     {
      "name": "LT",
      "type": "uint64",
      "internalType": "uint64"
     },
     {
      "name": "exists",
      "type": "bool",
      "internalType": "bool"
     }
    ]
   }
  ],
  "stateMutability": "view"
 },
 {
  "type": "function",
  "name": "hashTerms",
  "inputs": [
   {
    "name": "assetId",
    "type": "bytes32",
    "internalType": "bytes32"
   },
   {
    "name": "t",
    "type": "tuple",
    "internalType": "struct KerbTerms.Terms",
    "components": [
     {
      "name": "observedAt",
      "type": "uint64",
      "internalType": "uint64"
     },
     {
      "name": "regime",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "creditMark",
      "type": "uint128",
      "internalType": "uint128"
     },
     {
      "name": "carryLTV",
      "type": "uint64",
      "internalType": "uint64"
     },
     {
      "name": "sessionMaxLTV",
      "type": "uint64",
      "internalType": "uint64"
     },
     {
      "name": "debtCeiling",
      "type": "uint128",
      "internalType": "uint128"
     },
     {
      "name": "maxPositionDebt",
      "type": "uint128",
      "internalType": "uint128"
     },
     {
      "name": "executableDepth1",
      "type": "uint128",
      "internalType": "uint128"
     },
     {
      "name": "inputsHash",
      "type": "bytes32",
      "internalType": "bytes32"
     },
     {
      "name": "engineVersion",
      "type": "bytes32",
      "internalType": "bytes32"
     }
    ]
   }
  ],
  "outputs": [
   {
    "name": "",
    "type": "bytes32",
    "internalType": "bytes32"
   }
  ],
  "stateMutability": "view"
 },
 {
  "type": "function",
  "name": "isAttester",
  "inputs": [
   {
    "name": "",
    "type": "address",
    "internalType": "address"
   }
  ],
  "outputs": [
   {
    "name": "",
    "type": "bool",
    "internalType": "bool"
   }
  ],
  "stateMutability": "view"
 },
 {
  "type": "function",
  "name": "lastLoosenAt",
  "inputs": [
   {
    "name": "",
    "type": "bytes32",
    "internalType": "bytes32"
   }
  ],
  "outputs": [
   {
    "name": "",
    "type": "uint64",
    "internalType": "uint64"
   }
  ],
  "stateMutability": "view"
 },
 {
  "type": "function",
  "name": "latest",
  "inputs": [
   {
    "name": "assetId",
    "type": "bytes32",
    "internalType": "bytes32"
   }
  ],
  "outputs": [
   {
    "name": "",
    "type": "tuple",
    "internalType": "struct KerbTerms.Terms",
    "components": [
     {
      "name": "observedAt",
      "type": "uint64",
      "internalType": "uint64"
     },
     {
      "name": "regime",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "creditMark",
      "type": "uint128",
      "internalType": "uint128"
     },
     {
      "name": "carryLTV",
      "type": "uint64",
      "internalType": "uint64"
     },
     {
      "name": "sessionMaxLTV",
      "type": "uint64",
      "internalType": "uint64"
     },
     {
      "name": "debtCeiling",
      "type": "uint128",
      "internalType": "uint128"
     },
     {
      "name": "maxPositionDebt",
      "type": "uint128",
      "internalType": "uint128"
     },
     {
      "name": "executableDepth1",
      "type": "uint128",
      "internalType": "uint128"
     },
     {
      "name": "inputsHash",
      "type": "bytes32",
      "internalType": "bytes32"
     },
     {
      "name": "engineVersion",
      "type": "bytes32",
      "internalType": "bytes32"
     }
    ]
   }
  ],
  "stateMutability": "view"
 },
 {
  "type": "function",
  "name": "postTerms",
  "inputs": [
   {
    "name": "assetId",
    "type": "bytes32",
    "internalType": "bytes32"
   },
   {
    "name": "t",
    "type": "tuple",
    "internalType": "struct KerbTerms.Terms",
    "components": [
     {
      "name": "observedAt",
      "type": "uint64",
      "internalType": "uint64"
     },
     {
      "name": "regime",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "creditMark",
      "type": "uint128",
      "internalType": "uint128"
     },
     {
      "name": "carryLTV",
      "type": "uint64",
      "internalType": "uint64"
     },
     {
      "name": "sessionMaxLTV",
      "type": "uint64",
      "internalType": "uint64"
     },
     {
      "name": "debtCeiling",
      "type": "uint128",
      "internalType": "uint128"
     },
     {
      "name": "maxPositionDebt",
      "type": "uint128",
      "internalType": "uint128"
     },
     {
      "name": "executableDepth1",
      "type": "uint128",
      "internalType": "uint128"
     },
     {
      "name": "inputsHash",
      "type": "bytes32",
      "internalType": "bytes32"
     },
     {
      "name": "engineVersion",
      "type": "bytes32",
      "internalType": "bytes32"
     }
    ]
   },
   {
    "name": "sig",
    "type": "bytes",
    "internalType": "bytes"
   }
  ],
  "outputs": [],
  "stateMutability": "nonpayable"
 },
 {
  "type": "function",
  "name": "setAdmin",
  "inputs": [
   {
    "name": "newAdmin",
    "type": "address",
    "internalType": "address"
   }
  ],
  "outputs": [],
  "stateMutability": "nonpayable"
 },
 {
  "type": "function",
  "name": "setAttester",
  "inputs": [
   {
    "name": "attester",
    "type": "address",
    "internalType": "address"
   },
   {
    "name": "allowed",
    "type": "bool",
    "internalType": "bool"
   }
  ],
  "outputs": [],
  "stateMutability": "nonpayable"
 },
 {
  "type": "function",
  "name": "setGuardrails",
  "inputs": [
   {
    "name": "assetId",
    "type": "bytes32",
    "internalType": "bytes32"
   },
   {
    "name": "g",
    "type": "tuple",
    "internalType": "struct KerbTerms.Guardrails",
    "components": [
     {
      "name": "ltvMin",
      "type": "uint64",
      "internalType": "uint64"
     },
     {
      "name": "ltvMax",
      "type": "uint64",
      "internalType": "uint64"
     },
     {
      "name": "ceilingMin",
      "type": "uint128",
      "internalType": "uint128"
     },
     {
      "name": "ceilingMax",
      "type": "uint128",
      "internalType": "uint128"
     },
     {
      "name": "maxLoosenStepBps",
      "type": "uint64",
      "internalType": "uint64"
     },
     {
      "name": "loosenCooldownSec",
      "type": "uint32",
      "internalType": "uint32"
     },
     {
      "name": "maxReportAgeSec",
      "type": "uint32",
      "internalType": "uint32"
     },
     {
      "name": "LT",
      "type": "uint64",
      "internalType": "uint64"
     },
     {
      "name": "exists",
      "type": "bool",
      "internalType": "bool"
     }
    ]
   }
  ],
  "outputs": [],
  "stateMutability": "nonpayable"
 },
 {
  "type": "function",
  "name": "setTimelock",
  "inputs": [
   {
    "name": "newTimelock",
    "type": "address",
    "internalType": "address"
   }
  ],
  "outputs": [],
  "stateMutability": "nonpayable"
 },
 {
  "type": "function",
  "name": "timelock",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "address",
    "internalType": "address"
   }
  ],
  "stateMutability": "view"
 },
 {
  "type": "event",
  "name": "AdminSet",
  "inputs": [
   {
    "name": "admin",
    "type": "address",
    "indexed": true,
    "internalType": "address"
   }
  ],
  "anonymous": false
 },
 {
  "type": "event",
  "name": "AttesterSet",
  "inputs": [
   {
    "name": "attester",
    "type": "address",
    "indexed": true,
    "internalType": "address"
   },
   {
    "name": "allowed",
    "type": "bool",
    "indexed": false,
    "internalType": "bool"
   }
  ],
  "anonymous": false
 },
 {
  "type": "event",
  "name": "EIP712DomainChanged",
  "inputs": [],
  "anonymous": false
 },
 {
  "type": "event",
  "name": "GuardrailsUpdated",
  "inputs": [
   {
    "name": "assetId",
    "type": "bytes32",
    "indexed": true,
    "internalType": "bytes32"
   },
   {
    "name": "guardrails",
    "type": "tuple",
    "indexed": false,
    "internalType": "struct KerbTerms.Guardrails",
    "components": [
     {
      "name": "ltvMin",
      "type": "uint64",
      "internalType": "uint64"
     },
     {
      "name": "ltvMax",
      "type": "uint64",
      "internalType": "uint64"
     },
     {
      "name": "ceilingMin",
      "type": "uint128",
      "internalType": "uint128"
     },
     {
      "name": "ceilingMax",
      "type": "uint128",
      "internalType": "uint128"
     },
     {
      "name": "maxLoosenStepBps",
      "type": "uint64",
      "internalType": "uint64"
     },
     {
      "name": "loosenCooldownSec",
      "type": "uint32",
      "internalType": "uint32"
     },
     {
      "name": "maxReportAgeSec",
      "type": "uint32",
      "internalType": "uint32"
     },
     {
      "name": "LT",
      "type": "uint64",
      "internalType": "uint64"
     },
     {
      "name": "exists",
      "type": "bool",
      "internalType": "bool"
     }
    ]
   }
  ],
  "anonymous": false
 },
 {
  "type": "event",
  "name": "TermsPosted",
  "inputs": [
   {
    "name": "assetId",
    "type": "bytes32",
    "indexed": true,
    "internalType": "bytes32"
   },
   {
    "name": "attester",
    "type": "address",
    "indexed": true,
    "internalType": "address"
   },
   {
    "name": "observedAt",
    "type": "uint64",
    "indexed": false,
    "internalType": "uint64"
   },
   {
    "name": "regime",
    "type": "uint16",
    "indexed": false,
    "internalType": "uint16"
   },
   {
    "name": "creditMark",
    "type": "uint128",
    "indexed": false,
    "internalType": "uint128"
   },
   {
    "name": "carryLTV",
    "type": "uint64",
    "indexed": false,
    "internalType": "uint64"
   },
   {
    "name": "sessionMaxLTV",
    "type": "uint64",
    "indexed": false,
    "internalType": "uint64"
   },
   {
    "name": "debtCeiling",
    "type": "uint128",
    "indexed": false,
    "internalType": "uint128"
   },
   {
    "name": "executableDepth1",
    "type": "uint128",
    "indexed": false,
    "internalType": "uint128"
   },
   {
    "name": "inputsHash",
    "type": "bytes32",
    "indexed": false,
    "internalType": "bytes32"
   }
  ],
  "anonymous": false
 },
 {
  "type": "event",
  "name": "TimelockSet",
  "inputs": [
   {
    "name": "timelock",
    "type": "address",
    "indexed": true,
    "internalType": "address"
   }
  ],
  "anonymous": false
 },
 {
  "type": "error",
  "name": "BadSignature",
  "inputs": []
 },
 {
  "type": "error",
  "name": "InputsHashRequired",
  "inputs": []
 },
 {
  "type": "error",
  "name": "InvalidShortString",
  "inputs": []
 },
 {
  "type": "error",
  "name": "LoosenTooFast",
  "inputs": [
   {
    "name": "field",
    "type": "string",
    "internalType": "string"
   },
   {
    "name": "fromValue",
    "type": "uint256",
    "internalType": "uint256"
   },
   {
    "name": "toValue",
    "type": "uint256",
    "internalType": "uint256"
   },
   {
    "name": "maxStepBps",
    "type": "uint64",
    "internalType": "uint64"
   }
  ]
 },
 {
  "type": "error",
  "name": "LoosenTooSoon",
  "inputs": [
   {
    "name": "field",
    "type": "string",
    "internalType": "string"
   },
   {
    "name": "sinceLastLoosen",
    "type": "uint64",
    "internalType": "uint64"
   },
   {
    "name": "cooldownSec",
    "type": "uint32",
    "internalType": "uint32"
   }
  ]
 },
 {
  "type": "error",
  "name": "NotAdmin",
  "inputs": []
 },
 {
  "type": "error",
  "name": "NotAnAttester",
  "inputs": [
   {
    "name": "signer",
    "type": "address",
    "internalType": "address"
   }
  ]
 },
 {
  "type": "error",
  "name": "NotTimelock",
  "inputs": []
 },
 {
  "type": "error",
  "name": "ObservedAtNotIncreasing",
  "inputs": [
   {
    "name": "observedAt",
    "type": "uint64",
    "internalType": "uint64"
   },
   {
    "name": "latest",
    "type": "uint64",
    "internalType": "uint64"
   }
  ]
 },
 {
  "type": "error",
  "name": "OutOfGuardrails",
  "inputs": [
   {
    "name": "field",
    "type": "string",
    "internalType": "string"
   },
   {
    "name": "value",
    "type": "uint256",
    "internalType": "uint256"
   }
  ]
 },
 {
  "type": "error",
  "name": "ReportInFuture",
  "inputs": [
   {
    "name": "observedAt",
    "type": "uint64",
    "internalType": "uint64"
   }
  ]
 },
 {
  "type": "error",
  "name": "ReportTooOld",
  "inputs": [
   {
    "name": "observedAt",
    "type": "uint64",
    "internalType": "uint64"
   },
   {
    "name": "maxAgeSec",
    "type": "uint32",
    "internalType": "uint32"
   }
  ]
 },
 {
  "type": "error",
  "name": "StringTooLong",
  "inputs": [
   {
    "name": "str",
    "type": "string",
    "internalType": "string"
   }
  ]
 },
 {
  "type": "error",
  "name": "UnknownAsset",
  "inputs": [
   {
    "name": "assetId",
    "type": "bytes32",
    "internalType": "bytes32"
   }
  ]
 },
 {
  "type": "error",
  "name": "ZeroAddress",
  "inputs": []
 }
]
