1
- import { Inject , Injectable , LoggerService , OnModuleInit } from '@nestjs/common' ;
1
+ import { Inject , Injectable , LoggerService } from '@nestjs/common' ;
2
2
import { LOGGER_PROVIDER } from '@lido-nestjs/logger' ;
3
3
import { GenesisTimeService , SLOTS_PER_EPOCH } from '../genesis-time' ;
4
4
import {
@@ -16,15 +16,14 @@ import { parseGwei } from '../utils/parse-gwei';
16
16
import { bigNumberMin } from '../utils/big-number-min' ;
17
17
import { Withdrawal } from './sweep.types' ;
18
18
import { BeaconState , IndexedValidator , Validator } from '../consensus-provider/consensus-provider.types' ;
19
- import { ethers , Interface } from 'ethers' ;
19
+ import { ethers } from 'ethers' ;
20
20
import { OracleV2__factory } from '../contracts/generated' ;
21
21
import { VALIDATORS_EXIT_BUS_ORACLE_CONTRACT_ADDRESSES } from '../contracts/modules/validators-exit-bus-oracle/validators-exit-bus-oracle.constants' ;
22
22
import { ConfigService } from '../config' ;
23
- import { ExecutionProviderService } from '../execution-provider' ;
24
23
import { SimpleFallbackJsonRpcBatchProvider } from '@lido-nestjs/execution' ;
25
24
26
25
@Injectable ( )
27
- export class SweepService implements OnModuleInit {
26
+ export class SweepService {
28
27
constructor (
29
28
@Inject ( LOGGER_PROVIDER ) protected readonly logger : LoggerService ,
30
29
protected readonly consensusClientService : ConsensusClientService ,
@@ -33,11 +32,6 @@ export class SweepService implements OnModuleInit {
33
32
protected readonly configService : ConfigService ,
34
33
) { }
35
34
36
- public async onModuleInit ( ) : Promise < void > {
37
- const epoch = this . genesisService . getCurrentEpoch ( ) ;
38
- await this . getSweepDelayInEpochs ( [ ] , epoch ) ;
39
- }
40
-
41
35
async getConsensusVersion ( ) {
42
36
const chainId = this . configService . get ( 'CHAIN_ID' ) ;
43
37
const provider = new ethers . JsonRpcProvider ( this . configService . get ( 'EL_RPC_URLS' ) [ 0 ] ) ;
0 commit comments