diff --git a/newsfragments/3014.bug.rst b/newsfragments/3014.bug.rst deleted file mode 100644 index e4d7f21cf..000000000 --- a/newsfragments/3014.bug.rst +++ /dev/null @@ -1,10 +0,0 @@ -Resolve function_abi AFTER condition is initialized - -Problem -- when specifying a `standard_contract_type`, the `function_abi` is resolved - immediately -- when this condition is serialized, it contains both `standard_contract_type` - and `function_abi`, which we are trying to prevent - -Solution -- call `_resolve_abi` after the condition is initialized diff --git a/newsfragments/3014.bugfix.rst b/newsfragments/3014.bugfix.rst new file mode 100644 index 000000000..1ea4f5010 --- /dev/null +++ b/newsfragments/3014.bugfix.rst @@ -0,0 +1 @@ +Call `_resolve_abi` after the condition is initialized diff --git a/tests/unit/conditions/test_condition_validity.py b/tests/unit/conditions/test_condition_validity.py index 8a6deff82..840442488 100644 --- a/tests/unit/conditions/test_condition_validity.py +++ b/tests/unit/conditions/test_condition_validity.py @@ -116,7 +116,7 @@ def test_invalid_contract_condition(): with pytest.raises(InvalidCondition): _ = ContractCondition( contract_address="0xaDD9D957170dF6F33982001E4c22eCCdd5539118", - method="getPolicy", + method="balanceOf", chain=TESTERCHAIN_CHAIN_ID, standard_contract_type="ERC20", function_abi={"rando": "ABI"},