Skip to content

Commit

Permalink
Remove excess keeper stake check (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
defi-dev authored Mar 27, 2024
1 parent 4ed0a69 commit 7c5d456
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions app/agents/AbstractAgent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import logger from '../services/Logger.js';

// const FLAG_ACCEPT_MAX_BASE_FEE_LIMIT = 1;
const FLAG_ACCRUE_REWARD = 2;
const BIG_NUMBER_1E18 = BigNumber.from(10).pow(18);
// const BIG_NUMBER_1E18 = BigNumber.from(10).pow(18);

export abstract class AbstractAgent implements IAgent {
public readonly executorType: ExecutorType;
Expand Down Expand Up @@ -232,13 +232,6 @@ export abstract class AbstractAgent implements IAgent {
// Task #1
const agentConfig = await this.queryAgentConfig();
this.minKeeperCvp = agentConfig.minKeeperCvp_;
if (keeperConfig.currentStake.lt(agentConfig.minKeeperCvp_)) {
throw this.err(
`The keeper's stake for agent '${this.address}' is insufficient: ${keeperConfig.currentStake.div(
BIG_NUMBER_1E18,
)} CVP (actual) < ${this.minKeeperCvp.div(BIG_NUMBER_1E18)} CVP (required).`,
);
}
this.clog('info', `Keeper stake: (current=${keeperConfig.currentStake},min=${this.minKeeperCvp})`);
// TODO: track agent SetAgentParams
// TODO: assert the keeper has enough CVP for a job
Expand Down

0 comments on commit 7c5d456

Please sign in to comment.