Overview
I tried to use the selector_fn override but struggled in the case of Starknet which uses longer, int-based selectors.
I think the problem is with the int type so my suggestion for ethpm-types is to make a good test case of switching the selector fn to Starknet style and using it. I know work needs to be done here but not 100% sure what it is but making this ticket as a reminder to do it!
Specification
class CustomContractType(ContracType):
_selector_fn = <some-int-hash-based-look-up>
def test_custom_int_selectors(contract_dict):
contract_type = ContractType.parse_obj(contract_dict)
actual = contract_type.mutable_methods[32451345]
expected = contract_type.MyExpectedMethod
assert actual == expected
Dependencies
Include links to any open issues that must be resolved before this feature can be implemented.
Overview
I tried to use the
selector_fnoverride but struggled in the case of Starknet which uses longer, int-based selectors.I think the problem is with the
inttype so my suggestion forethpm-typesis to make a good test case of switching the selector fn to Starknet style and using it. I know work needs to be done here but not 100% sure what it is but making this ticket as a reminder to do it!Specification
Dependencies
Include links to any open issues that must be resolved before this feature can be implemented.