File tree Expand file tree Collapse file tree 2 files changed +21
-4
lines changed
src/services/liquidate/partial Expand file tree Collapse file tree 2 files changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,9 @@ export const FLASH_MINTERS: Partial<
1717 GHO : "0xb639D208Bcf0589D54FaC24E655C79EC529762B8" ,
1818 DOLA : "0x6C5Fdc0c53b122Ae0f15a863C349f3A481DE8f1F" ,
1919 } ,
20+ Berachain : {
21+ NECT : "0x1ce0a25d13ce4d52071ae7e02cf1f6606f4c79d3" ,
22+ } ,
2023} ;
2124
2225export const SONIC_USDCE_SILO : Address =
Original file line number Diff line number Diff line change @@ -8,20 +8,27 @@ import {
88 GhoLiquidator_bytecode ,
99 GhoUnwinder_bytecode ,
1010} from "@gearbox-protocol/liquidator-contracts/bytecode" ;
11- import type { CreditSuite , Curator } from "@gearbox-protocol/sdk" ;
11+ import {
12+ type CreditSuite ,
13+ type Curator ,
14+ isVersionRange ,
15+ VERSION_RANGE_310 ,
16+ } from "@gearbox-protocol/sdk" ;
1217import type { Address } from "viem" ;
1318
1419import { FLASH_MINTERS } from "../constants.js" ;
1520import PartialLiquidatorV310Contract from "./PartialLiquidatorV310Contract.js" ;
1621
22+ type GhoLiquidatorToken = "DOLA" | "GHO" | "NECT" ;
23+
1724export class GHOLiquidatorV310Contract extends PartialLiquidatorV310Contract {
18- #token: "DOLA" | "GHO" ;
25+ #token: GhoLiquidatorToken ;
1926 #flashMinter: Address ;
2027
2128 public static tryAttach (
2229 cm : CreditSuite ,
2330 ) : GHOLiquidatorV310Contract | undefined {
24- if ( cm . router . version < 310 || cm . router . version > 319 ) {
31+ if ( ! isVersionRange ( cm . router . version , VERSION_RANGE_310 ) ) {
2532 return undefined ;
2633 }
2734 const curator = cm . name . includes ( "K3" ) ? "K3" : "Chaos Labs" ;
@@ -45,14 +52,21 @@ export class GHOLiquidatorV310Contract extends PartialLiquidatorV310Contract {
4552 "DOLA" ,
4653 flashMinter ,
4754 ) ;
55+ case "NECT" :
56+ return new GHOLiquidatorV310Contract (
57+ cm . router . address ,
58+ curator ,
59+ "NECT" ,
60+ flashMinter ,
61+ ) ;
4862 }
4963 return undefined ;
5064 }
5165
5266 constructor (
5367 router : Address ,
5468 curator : Curator ,
55- token : "DOLA" | "GHO" ,
69+ token : GhoLiquidatorToken ,
5670 flashMinter : Address ,
5771 ) {
5872 super ( token , router , curator ) ;
You can’t perform that action at this time.
0 commit comments