diff --git a/deploy/gnosis/docker-compose.yml b/deploy/gnosis/docker-compose.yml index cb1c3af..60f63fe 100644 --- a/deploy/gnosis/docker-compose.yml +++ b/deploy/gnosis/docker-compose.yml @@ -24,7 +24,7 @@ networks: services: oracle: container_name: oracle_gnosis - image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:v4.0.1 + image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:v4.0.2 restart: always entrypoint: ["python"] command: ["oracle/oracle/main.py"] @@ -34,7 +34,7 @@ services: keeper: container_name: keeper_gnosis - image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:v4.0.1 + image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:v4.0.2 restart: always entrypoint: ["python"] command: ["oracle/keeper/main.py"] diff --git a/oracle/networks.py b/oracle/networks.py index fc10ec5..9874b38 100644 --- a/oracle/networks.py +++ b/oracle/networks.py @@ -410,7 +410,7 @@ Web3.toChecksumAddress("0x59ecf48345a221e0731e785ed79ed40d0a94e2a5"): 4971, Web3.toChecksumAddress("0xf37c8f35fc820354b402054699610c098559ae44"): 4971, }, - WITHDRAWALS_CACHE_BLOCK=33192932, - WITHDRAWALS_CACHE_AMOUNT=286633425704392, + WITHDRAWALS_CACHE_BLOCK=33342932, + WITHDRAWALS_CACHE_AMOUNT=290112726977685, ), } diff --git a/oracle/oracle/rewards/controller.py b/oracle/oracle/rewards/controller.py index 99c1757..59f7648 100644 --- a/oracle/oracle/rewards/controller.py +++ b/oracle/oracle/rewards/controller.py @@ -44,15 +44,15 @@ class WithdrawalsCache: - def __init__(self, block: BlockNumber = None, withdrawals: Wei = None): + def __init__(self, block: BlockNumber = None, withdrawals: int = None): self.block = block self.withdrawals = withdrawals - def set(self, block: BlockNumber, withdrawals: Wei): + def set(self, block: BlockNumber, withdrawals: int): self.block = block self.withdrawals = withdrawals - def get(self) -> tuple[BlockNumber, Wei]: + def get(self) -> tuple[BlockNumber, int]: return self.block, self.withdrawals @@ -258,12 +258,12 @@ async def calculate_withdrawal_rewards( execution_client=execution_client, ) + self.withdrawals_cache.set(to_block, withdrawals_amount) withdrawals_amount = Web3.toWei(withdrawals_amount, "gwei") if NETWORK == GNOSIS_CHAIN: # apply mGNO <-> GNO exchange rate withdrawals_amount = Wei(int(withdrawals_amount * WAD // MGNO_RATE)) - self.withdrawals_cache.set(to_block, withdrawals_amount) return withdrawals_amount async def fetch_withdrawal_chunk( diff --git a/pyproject.toml b/pyproject.toml index 211ced2..47796dd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "oracle" -version = "4.0.1" +version = "4.0.2" description = "StakeWise Oracles are responsible for submitting off-chain data." authors = ["Dmitri Tsumak "] license = "AGPL-3.0-only"