Skip to content

Commit 75bb9b5

Browse files
committed
fix: print expected env
1 parent 37b27a5 commit 75bb9b5

File tree

5 files changed

+20
-0
lines changed

5 files changed

+20
-0
lines changed

src/services/liquidate/AAVELiquidatorContract.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,8 @@ export default class AAVELiquidatorContract extends PartialLiquidatorContract {
9797
this.logger.info(`partial liquidator contract addesss: ${address}`);
9898
this.address = address;
9999
}
100+
101+
public get envVariable(): [key: string, value: string] {
102+
return ["AAVE_PARTIAL_LIQUIDATOR_ADDRESS", this.address];
103+
}
100104
}

src/services/liquidate/GHOLiquidatorContract.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,4 +137,8 @@ export default class GHOLiquidatorContract extends PartialLiquidatorContract {
137137
`${this.#token} flash minter is not available on ${this.config.network}`,
138138
);
139139
}
140+
141+
public get envVariable(): [key: string, value: string] {
142+
return [`${this.#token}_PARTIAL_LIQUIDATOR_ADDRESS`, this.address];
143+
}
140144
}

src/services/liquidate/PartialLiquidatorContract.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,8 @@ export default abstract class PartialLiquidatorContract {
248248
}
249249
}
250250

251+
public abstract get envVariable(): [key: string, value: string];
252+
251253
protected set address(value: Address) {
252254
this.#address = value;
253255
}

src/services/liquidate/SiloLiquidatorContract.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,4 +140,8 @@ export default class SiloLiquidatorContract extends PartialLiquidatorContract {
140140
}
141141
return this.#siloFLTaker;
142142
}
143+
144+
public get envVariable(): [key: string, value: string] {
145+
return ["SILO_PARTIAL_LIQUIDATOR_ADDRESS", this.address];
146+
}
143147
}

src/services/liquidate/SingularPartialLiquidator.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ export default class SingularPartialLiquidator extends SingularLiquidator<Partia
8383
liquidatorContracts = await this.#getDefaultContracts(cms, router, bot);
8484
}
8585

86+
let expectedEnv: Record<string, string> = {};
8687
for (const contract of liquidatorContracts) {
8788
if (!contract.isSupported) {
8889
this.logger.info(
@@ -92,7 +93,12 @@ export default class SingularPartialLiquidator extends SingularLiquidator<Partia
9293
}
9394
await contract.deploy();
9495
await contract.configure();
96+
expectedEnv = {
97+
...expectedEnv,
98+
...Object.fromEntries([contract.envVariable]),
99+
};
95100
}
101+
this.logger.info(expectedEnv, "expected env");
96102
}
97103

98104
async #getDefaultContracts(

0 commit comments

Comments
 (0)