Skip to content

Commit

Permalink
Fix clients functions calls (#103)
Browse files Browse the repository at this point in the history
Signed-off-by: cyc60 <[email protected]>
  • Loading branch information
cyc60 authored Aug 10, 2022
1 parent 115efa0 commit bcf21ec
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions oracle/oracle/distributor/common/eth1.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ async def get_partners_rewards(
) -> Tuple[Rewards, Wei]:
"""Fetches partners rewards."""
result: Dict = await execute_sw_gql_query(
network=network,
query=PARTNERS_QUERY,
variables=dict(
block_number=to_block,
Expand Down
1 change: 1 addition & 0 deletions oracle/oracle/distributor/common/uniswap_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ async def get_uniswap_v3_liquidity_points(
return Balances(total_supply=0, balances={})

positions: List = await execute_uniswap_v3_paginated_gql_query(
network=network,
query=UNISWAP_V3_CURRENT_TICK_POSITIONS_QUERY,
variables=dict(
block_number=block_number,
Expand Down
4 changes: 4 additions & 0 deletions oracle/oracle/validators/eth1.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
VALIDATOR_REGISTRATIONS_QUERY,
)
from oracle.oracle.common.ipfs import ipfs_fetch
from oracle.settings import NETWORK

from .types import ValidatorDepositData

Expand All @@ -23,6 +24,7 @@ async def select_validator(
) -> Union[None, ValidatorDepositData]:
"""Selects the next validator to register."""
result: Dict = await execute_sw_gql_query(
network=NETWORK,
query=OPERATORS_QUERY,
variables=dict(block_number=block_number),
)
Expand Down Expand Up @@ -71,6 +73,7 @@ async def select_validator(
async def can_register_validator(block_number: BlockNumber, public_key: HexStr) -> bool:
"""Checks whether it's safe to register the validator."""
result: Dict = await execute_ethereum_gql_query(
network=NETWORK,
query=VALIDATOR_REGISTRATIONS_QUERY,
variables=dict(block_number=block_number, public_key=public_key),
)
Expand All @@ -82,6 +85,7 @@ async def can_register_validator(block_number: BlockNumber, public_key: HexStr)
async def get_validators_deposit_root(block_number: BlockNumber) -> HexStr:
"""Fetches validators deposit root for protecting against operator submitting deposit prior to registration."""
result: Dict = await execute_ethereum_gql_query(
network=NETWORK,
query=VALIDATOR_REGISTRATIONS_LATEST_INDEX_QUERY,
variables=dict(block_number=block_number),
)
Expand Down

0 comments on commit bcf21ec

Please sign in to comment.