Fix newsfragment and ensure conditions test has a valid method

pull/3014/head
James Campbell 2022-11-15 14:58:56 +00:00
parent 4c5dadbad4
commit bdaaafd9c3
3 changed files with 2 additions and 11 deletions

View File

@ -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

View File

@ -0,0 +1 @@
Call `_resolve_abi` after the condition is initialized

View File

@ -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"},