Skip to content

Commit

Permalink
fix: review
Browse files Browse the repository at this point in the history
  • Loading branch information
eddort committed Mar 14, 2023
1 parent 418d68e commit fb3d0ff
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- develop
paths-ignore:
- ".github/**"
- "README.md"

permissions: {}

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- main
paths-ignore:
- ".github/**"
- "README.md"

permissions: {}

Expand Down
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ LOG_FORMAT=simple
PUBSUB_SERVICE=rabbitmq
# RabbitMQ
RABBITMQ_URL=rabbitmq_url
RABBITMQ_URL=wss://rabbitmq_url
RABBITMQ_LOGIN=test
RABBITMQ_PASSCODE=test
Expand Down Expand Up @@ -215,6 +215,22 @@ debug: Fresh events are fetched {"startBlock":5679828,"endBlock":5679978,"events
info: No problems found {"type":"deposit","depositRoot":"0xc2c9308fa425a64ef9cac1837412ba462b6429fce2f170184284a260b735638c","keysOpIndex":12,"blockNumber":5679978,"blockHash":"0x87762c941f653f2f70157f86deac78f19e4d1549e231a52d1191289592d1a0ab","guardianAddress":"0x3dc4cF780F2599B528F37dedB34449Fb65Ef7d4A","guardianIndex":0,"signature":{"r":"0x44fec2e6fd34e74b8f001ef0e5bbd2db6d3179925fb82cb43231e19af46f0ddd","s":"0x2ff4326af760e353803458b75279eb8f58e5735b3565ea16bcd0f773bce106a4","_vs":"0xaff4326af760e353803458b75279eb8f58e5735b3565ea16bcd0f773bce106a4","recoveryParam":1,"v":28}}
debug: Fresh events are fetched {"startBlock":5679829,"endBlock":5679979,"events":7}
```

Init contracts addresses

```log
info: Contract initial address {"address":"0x0000000000000000000000000000000000000000","contractKey":"contract:LidoAbi"}
info: Contract initial address {"address":"0x0000000000000000000000000000000000000000","contractKey":"contract:SecurityAbi"}
info: Contract initial address {"address":"0x0000000000000000000000000000000000000000","contractKey":"contract:StakingRouterAbi"}
```

If contract addresses changed

```log
info: Contract address was changed {"address":"0x0000000000000000000000000000000000000000","contractKey":"contract:LidoAbi"}
info: Contract address was changed {"address":"0x0000000000000000000000000000000000000000","contractKey":"contract:SecurityAbi"}
info: Contract address was changed {"address":"0x0000000000000000000000000000000000000000","contractKey":"contract:StakingRouterAbi"}
```
## Development

```bash
Expand Down
2 changes: 1 addition & 1 deletion sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ LOG_FORMAT=simple
PUBSUB_SERVICE=rabbitmq

# RabbitMQ
RABBITMQ_URL=rabbitmq_url
RABBITMQ_URL=wss://rabbitmq_url
RABBITMQ_LOGIN=test
RABBITMQ_PASSCODE=test

Expand Down
6 changes: 3 additions & 3 deletions src/contracts/repository/repository.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,14 @@ export class RepositoryService {
impl: LidoAbi | LocatorAbi | SecurityAbi | StakingRouterAbi,
) {
if (!this.tempContractsCache[contractKey]) {
this.logger.log('Init implementation', { address, contractKey });
this.logger.log('Contract initial address', { address, contractKey });
}

if (
this.tempContractsCache[contractKey] &&
this.tempContractsCache[contractKey].address !== address
) {
this.logger.log('Implementation was changed', { address, contractKey });
this.logger.log('Contract address was changed', { address, contractKey });
}

this.tempContractsCache[contractKey] = impl;
Expand All @@ -101,7 +101,7 @@ export class RepositoryService {
contractKey: string,
impl: DepositAbi,
) {
this.logger.log('Init implementation', { address, contractKey });
this.logger.log('Contract initial address', { address, contractKey });
this.permanentContractsCache[contractKey] = impl;
}

Expand Down

0 comments on commit fb3d0ff

Please sign in to comment.