abi.ts 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. // This is only a subset of the generated abi necessary for the monitor script
  2. export const abi = [
  3. {
  4. type: "function",
  5. name: "getLastVaultId",
  6. inputs: [],
  7. outputs: [
  8. {
  9. name: "",
  10. type: "uint256",
  11. internalType: "uint256",
  12. },
  13. ],
  14. stateMutability: "view",
  15. },
  16. {
  17. type: "function",
  18. name: "getVault",
  19. inputs: [
  20. {
  21. name: "vaultId",
  22. type: "uint256",
  23. internalType: "uint256",
  24. },
  25. ],
  26. outputs: [
  27. {
  28. name: "",
  29. type: "tuple",
  30. internalType: "struct Vault",
  31. components: [
  32. {
  33. name: "tokenCollateral",
  34. type: "address",
  35. internalType: "address",
  36. },
  37. {
  38. name: "tokenDebt",
  39. type: "address",
  40. internalType: "address",
  41. },
  42. {
  43. name: "amountCollateral",
  44. type: "uint256",
  45. internalType: "uint256",
  46. },
  47. {
  48. name: "amountDebt",
  49. type: "uint256",
  50. internalType: "uint256",
  51. },
  52. {
  53. name: "minHealthRatio",
  54. type: "uint256",
  55. internalType: "uint256",
  56. },
  57. {
  58. name: "minPermissionLessHealthRatio",
  59. type: "uint256",
  60. internalType: "uint256",
  61. },
  62. {
  63. name: "tokenIdCollateral",
  64. type: "bytes32",
  65. internalType: "bytes32",
  66. },
  67. {
  68. name: "tokenIdDebt",
  69. type: "bytes32",
  70. internalType: "bytes32",
  71. },
  72. ],
  73. },
  74. ],
  75. stateMutability: "view",
  76. },
  77. {
  78. type: "function",
  79. name: "liquidate",
  80. inputs: [
  81. {
  82. name: "vaultId",
  83. type: "uint256",
  84. internalType: "uint256",
  85. },
  86. ],
  87. outputs: [],
  88. stateMutability: "nonpayable",
  89. },
  90. {
  91. type: "function",
  92. name: "liquidateWithPriceUpdate",
  93. inputs: [
  94. {
  95. name: "vaultId",
  96. type: "uint256",
  97. internalType: "uint256",
  98. },
  99. {
  100. name: "updateData",
  101. type: "bytes[]",
  102. internalType: "bytes[]",
  103. },
  104. ],
  105. outputs: [],
  106. stateMutability: "payable",
  107. },
  108. {
  109. type: "event",
  110. name: "VaultReceivedETH",
  111. inputs: [
  112. {
  113. name: "sender",
  114. type: "address",
  115. indexed: false,
  116. internalType: "address",
  117. },
  118. {
  119. name: "amount",
  120. type: "uint256",
  121. indexed: false,
  122. internalType: "uint256",
  123. },
  124. {
  125. name: "permissionKey",
  126. type: "bytes",
  127. indexed: false,
  128. internalType: "bytes",
  129. },
  130. ],
  131. anonymous: false,
  132. },
  133. {
  134. type: "error",
  135. name: "InvalidHealthRatios",
  136. inputs: [],
  137. },
  138. {
  139. type: "error",
  140. name: "InvalidLiquidation",
  141. inputs: [],
  142. },
  143. {
  144. type: "error",
  145. name: "InvalidPriceExponent",
  146. inputs: [],
  147. },
  148. {
  149. type: "error",
  150. name: "InvalidVaultUpdate",
  151. inputs: [],
  152. },
  153. {
  154. type: "error",
  155. name: "NegativePrice",
  156. inputs: [],
  157. },
  158. {
  159. type: "error",
  160. name: "UncollateralizedVaultCreation",
  161. inputs: [],
  162. },
  163. ] as const;