Skip to content

Commit bd2c063

Browse files
committed
feat: upgrade hoodi
1 parent b36744b commit bd2c063

File tree

8 files changed

+21
-81
lines changed

8 files changed

+21
-81
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
"@ethersproject/units": "^5.7.0",
3232
"@fastify/static": "^7.0.4",
3333
"@lido-nestjs/consensus": "^1.5.0",
34-
"@lido-nestjs/constants": "^5.2.1",
35-
"@lido-nestjs/contracts": "^9.6.0",
34+
"@lido-nestjs/constants": "^5.3.0",
35+
"@lido-nestjs/contracts": "^9.7.0",
3636
"@lido-nestjs/decorators": "^1.0.0",
3737
"@lido-nestjs/execution": "^1.9.3",
3838
"@lido-nestjs/fetch": "^1.4.0",

src/common/config/config.service.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
import { ConfigService as ConfigServiceSource } from '@nestjs/config';
22
import { EnvironmentVariables } from './env.validation';
3-
import {
4-
AccountingOracleHashConsensusModule,
5-
LidoContractModule,
6-
LidoLocatorContractModule,
7-
OracleReportSanityCheckerModule,
8-
ValidatorsExitBusOracleHashConsensusModule,
9-
WithdrawalQueueContractModule,
10-
} from '@lido-nestjs/contracts';
113

124
export class ConfigService extends ConfigServiceSource<EnvironmentVariables> {
135
/**
@@ -26,18 +18,4 @@ export class ConfigService extends ConfigServiceSource<EnvironmentVariables> {
2618
public get<T extends keyof EnvironmentVariables>(key: T): EnvironmentVariables[T] {
2719
return super.get(key, { infer: true }) as EnvironmentVariables[T];
2820
}
29-
30-
public getCustomConfigContractsAddressMap() {
31-
return new Map<symbol, string>([
32-
[WithdrawalQueueContractModule.contractToken, this.get('WITHDRAWAL_QUEUE_CONTRACT_DEVNET_ADDRESS')],
33-
[LidoContractModule.contractToken, this.get('LIDO_CONTRACT_DEVNET_ADDRESS')],
34-
[OracleReportSanityCheckerModule.contractToken, this.get('ORACLE_REPORT_SANITY_CHECKER_DEVNET_ADDRESS')],
35-
[AccountingOracleHashConsensusModule.contractToken, this.get('ACCOUNTING_ORACLE_HASH_CONSENSUS_DEVNET_ADDRESS')],
36-
[
37-
ValidatorsExitBusOracleHashConsensusModule.contractToken,
38-
this.get('VALIDATORS_EXIT_BUS_ORACLE_HASH_CONSENSUS_DEVNET_ADDRESS'),
39-
],
40-
[LidoLocatorContractModule.contractToken, this.get('LIDO_LOCATOR_CONTRACT_DEVNET_ADDRESS')],
41-
]);
42-
}
4321
}

src/common/config/env.validation.ts

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -82,30 +82,6 @@ export class EnvironmentVariables {
8282
@Transform(({ value }) => Number(value))
8383
CHAIN_ID: number = null;
8484

85-
@IsOptional()
86-
@IsString()
87-
WITHDRAWAL_QUEUE_CONTRACT_DEVNET_ADDRESS = '';
88-
89-
@IsOptional()
90-
@IsString()
91-
LIDO_CONTRACT_DEVNET_ADDRESS = '';
92-
93-
@IsOptional()
94-
@IsString()
95-
ORACLE_REPORT_SANITY_CHECKER_DEVNET_ADDRESS = '';
96-
97-
@IsOptional()
98-
@IsString()
99-
ACCOUNTING_ORACLE_HASH_CONSENSUS_DEVNET_ADDRESS = '';
100-
101-
@IsOptional()
102-
@IsString()
103-
VALIDATORS_EXIT_BUS_ORACLE_HASH_CONSENSUS_DEVNET_ADDRESS = '';
104-
105-
@IsOptional()
106-
@IsString()
107-
LIDO_LOCATOR_CONTRACT_DEVNET_ADDRESS = '';
108-
10985
@IsOptional()
11086
@IsString()
11187
KEYS_API_BASE_PATH = '';

src/common/contracts/contracts.module.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
} from '@lido-nestjs/contracts';
99
import { Global, Module } from '@nestjs/common';
1010
import { ExecutionProvider } from 'common/execution-provider';
11-
import { ConfigService } from 'common/config';
1211

1312
@Global()
1413
@Module({
@@ -21,11 +20,10 @@ import { ConfigService } from 'common/config';
2120
LidoLocatorContractModule,
2221
].map((module) =>
2322
module.forRootAsync({
24-
async useFactory(provider: ExecutionProvider, config: ConfigService) {
25-
const addressMap = config.getCustomConfigContractsAddressMap();
26-
return { provider, address: addressMap.get(module.contractToken) };
23+
async useFactory(provider: ExecutionProvider) {
24+
return { provider };
2725
},
28-
inject: [ExecutionProvider, ConfigService],
26+
inject: [ExecutionProvider],
2927
}),
3028
),
3129
})

src/common/contracts/modules/validators-exit-bus-oracle/validators-exit-bus-oracle.constants.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/jobs/validators/lido-keys/lido-keys.client.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
import { Inject } from '@nestjs/common';
1+
import { Inject, Injectable } from '@nestjs/common';
22
import { LOGGER_PROVIDER, LoggerService } from '../../../common/logger';
33
import { ConfigService } from '../../../common/config';
44
import { KEYS_API_PATHS } from './lido-keys.constants';
55
import { LidoKeysData } from './lido-keys.types';
66

7+
@Injectable()
78
export class LidoKeysClient {
9+
protected endpoints = {
10+
usedKeys: '/v1/keys?used=true',
11+
};
12+
813
constructor(
914
@Inject(LOGGER_PROVIDER) protected readonly logger: LoggerService,
1015
protected readonly configService: ConfigService,
1116
) {}
1217

13-
protected endpoints: {
14-
usedKeys: '/v1/keys?used=true';
15-
};
16-
1718
protected getBasePath(): string {
1819
const envUrl = this.configService.get('KEYS_API_BASE_PATH');
1920

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import { CHAINS } from '@lido-nestjs/constants';
22

3-
const DEVNET_7 = '7032118028';
4-
53
export const KEYS_API_PATHS = {
64
[CHAINS.Mainnet]: 'https://keys-api.lido.fi',
75
[CHAINS.Goerli]: 'https://keys-api.testnet.fi',
86
[CHAINS.Holesky]: 'https://keys-api-holesky.testnet.fi',
9-
[DEVNET_7]: 'http://hr6vb81d1ndsx-pectra-devnet-7-keys-api.valset-01.testnet.fi',
7+
[CHAINS.Hoodi]: 'https://keys-api-holesky.testnet.fi',
108
};

yarn.lock

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,19 +1406,19 @@
14061406
node-abort-controller "^3.0.1"
14071407
node-fetch "^2.6.7"
14081408

1409-
"@lido-nestjs/constants@5.2.1", "@lido-nestjs/constants@^5.2.1":
1410-
version "5.2.1"
1411-
resolved "https://registry.yarnpkg.com/@lido-nestjs/constants/-/constants-5.2.1.tgz#f006972b7b69429f7623b0c5ac8b4bba594f9c01"
1412-
integrity sha512-0UvUdQ4KilnH0Nf5JkdKdOrS2HFMjmrS4+2wUXoX08N25MzFryWC0qcdFLp1bvod04Ey/PoUNlj+S2WVKEYgwQ==
1409+
"@lido-nestjs/constants@5.3.0", "@lido-nestjs/constants@^5.3.0":
1410+
version "5.3.0"
1411+
resolved "https://registry.yarnpkg.com/@lido-nestjs/constants/-/constants-5.3.0.tgz#a257d9aff873bc10c8be940541405342f82e610e"
1412+
integrity sha512-8lW8DPmZ1t4t8tOs7E4eqPlWCjhN9poe3q81DtG/Nt0+AMWzx4zTmeap0DGHdeMC4QPB3vRdjb2i3E+B4aJbgA==
14131413

1414-
"@lido-nestjs/contracts@^9.6.0":
1415-
version "9.6.0"
1416-
resolved "https://registry.yarnpkg.com/@lido-nestjs/contracts/-/contracts-9.6.0.tgz#8e01a78be5c0832c4be0d2544b602ec03e95ecf7"
1417-
integrity sha512-9HYtKc/5fYVldSfFfMlZ3aSJ1Ew7JTGF5NfkYVMah6B+iHzIxtC0SbOO8StbiASbdeyhMn44XebDj+JHaN34Ig==
1414+
"@lido-nestjs/contracts@^9.7.0":
1415+
version "9.7.0"
1416+
resolved "https://registry.yarnpkg.com/@lido-nestjs/contracts/-/contracts-9.7.0.tgz#bdfa4e224b1f62bdc87c3492c3803911cf178966"
1417+
integrity sha512-RAZkK2PsvdHujjRA7s6g6iV4I7Z4iz767YCRghUtObgCg7yC7G88FVUegejbJtKq6lKEEpsoezR4LPtWcfIwoQ==
14181418
dependencies:
14191419
"@ethersproject/abi" "^5.5.0"
14201420
"@ethersproject/providers" "^5.5.3"
1421-
"@lido-nestjs/constants" "5.2.1"
1421+
"@lido-nestjs/constants" "5.3.0"
14221422
ethers "^5.5.4"
14231423

14241424
"@lido-nestjs/decorators@^1.0.0":

0 commit comments

Comments
 (0)