Skip to content

Commit

Permalink
chore: fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
tamtamchik committed Jan 7, 2025
1 parent eac5eb8 commit 329ec11
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/modules/accounting/accounting.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def simulate_rebase_after_report(
chain_conf = self.get_chain_config(blockstamp)

withdrawal_share_rate = 0 # For initial calculation we assume 0 share rate
withdrawal_finalization_batches = [] # For initial calculation we assume no withdrawals
withdrawal_finalization_batches: list[int] = [] # For initial calculation we assume no withdrawals

report = ReportValues(
# Accounting contract has sanity check that timestamp is not in the future.
Expand Down
12 changes: 6 additions & 6 deletions src/providers/execution/contracts/accounting.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def handle_oracle_report(
NB: see `simulate_oracle_report` for simulation details.
"""

report = (
payload = (
report.timestamp,
report.time_elapsed,
report.cl_validators,
Expand All @@ -41,13 +41,13 @@ def handle_oracle_report(
report.net_cash_flows,
)

response = self.functions.handleOracleReport(report).call(
response = self.functions.handleOracleReport(payload).call(
transaction={'from': accounting_oracle_address},
block_identifier=block_identifier,
)

logger.info({
'msg': f'Call `handleOracleReport({report}).',
'msg': f'Call `handleOracleReport({payload}).',
'value': response,
'block_identifier': repr(block_identifier),
'to': self.address,
Expand All @@ -69,7 +69,7 @@ def simulate_oracle_report(
plugging the returned values to the following formula: `_simulatedShareRate = (postTotalPooledEther * 1e27) / postTotalShares`
"""

report = (
payload = (
report.timestamp,
report.time_elapsed,
report.cl_validators,
Expand All @@ -82,13 +82,13 @@ def simulate_oracle_report(
report.net_cash_flows,
)

response = self.functions.simulateOracleReport(report, withdrawal_share_rate).call(
response = self.functions.simulateOracleReport(payload, withdrawal_share_rate).call(
block_identifier=block_identifier
)
response = named_tuple_to_dataclass(response, CalculatedReportResults)

logger.info({
'msg': f'Call `simulateOracleReport({report}, {withdrawal_share_rate}).',
'msg': f'Call `simulateOracleReport({payload}, {withdrawal_share_rate}).',
'value': response,
'block_identifier': repr(block_identifier),
'to': self.address,
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/contracts/test_lido.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@


@pytest.mark.integration
def test_lido_contract_call(lido_contract, accounting_oracle_contract, burner_contract, caplog):
@pytest.mark.parametrize('environment', ['holesky-vaults-devnet-2'], indirect=True)
def test_lido_contract_call(lido_contract, caplog):
check_contract(
lido_contract,
[
Expand Down

0 comments on commit 329ec11

Please sign in to comment.