From 1b976516c7d4167c2c927d68d570717e195c0d2f Mon Sep 17 00:00:00 2001 From: Ali Maktabi Date: Tue, 17 Sep 2024 17:03:46 +0330 Subject: [PATCH] fixed arguments passing --- core/constraints/arbitrum.py | 4 ++-- core/constraints/optimism.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/constraints/arbitrum.py b/core/constraints/arbitrum.py index bc80222..611d3d8 100644 --- a/core/constraints/arbitrum.py +++ b/core/constraints/arbitrum.py @@ -125,8 +125,8 @@ def is_observed(self, *args, **kwargs) -> bool: for user_address in self.user_addresses: try: address = token_client.to_checksum_address(user_address) - delegated_address = token_client.get_delegates_address() - if ( + delegated_address = token_client.get_delegates_address(user_address) + if not delegated_address or ( ConstraintParam.ADDRESS.name in self.param_keys() and delegated_address.lower() != self.param_values[ConstraintParam.ADDRESS.name].lower() diff --git a/core/constraints/optimism.py b/core/constraints/optimism.py index fe4a1c1..4c51c66 100644 --- a/core/constraints/optimism.py +++ b/core/constraints/optimism.py @@ -53,8 +53,8 @@ def is_observed(self, *args, **kwargs) -> bool: for user_address in self.user_addresses: try: address = token_client.to_checksum_address(user_address) - delegated_address = token_client.get_delegates_address() - if ( + delegated_address = token_client.get_delegates_address(user_address) + if not delegated_address or ( ConstraintParam.ADDRESS.name in self.param_keys() and delegated_address.lower() != self.param_values[ConstraintParam.ADDRESS.name].lower()