this code gives the following error can anyone help?
api_key = "apikey"
params = {
"address": "0xc35DADB65012eC5796536bD9864eD8773aBc74C4",
"topic": "0x0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9",
"chain": "arbitrum",
"from_block": 0,
"to_block": 0,
"from_date": "",
"to_date": "",
"offset": 0,
"limit": 1
}
body = '{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Transfer","type":"event"}'
result = evm_api.events.get_contract_events(
api_key=api_key,
params=params,
body=body,
)
print(result)
error:
Traceback (most recent call last):
File "/Users/talha/Desktop/pythonbotlar/mysniperbot/sniperV4.py", line 296, in <module>
result = evm_api.events.get_contract_events(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/moralis/evm_api/events/get_contract_events.py", line 10, in get_contract_events
api_response = api_instance.get_contract_events(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/openapi_evm_api/paths/address_events/post.py", line 557, in get_contract_events
return self._get_contract_events_oapg(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/openapi_evm_api/paths/address_events/post.py", line 451, in _get_contract_events_oapg
serialized_data = request_body_body.serialize(body, content_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/openapi_evm_api/api_client.py", line 1488, in serialize
cast_in_data = media_type.schema(in_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/openapi_evm_api/schemas.py", line 2439, in __new__
return super().__new__(cls, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/openapi_evm_api/schemas.py", line 530, in __new__
__path_to_schemas = cls.__get_new_cls(__arg, __validation_metadata)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/openapi_evm_api/schemas.py", line 398, in __get_new_cls
other_path_to_schemas = cls._validate_oapg(arg, validation_metadata=validation_metadata)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/openapi_evm_api/schemas.py", line 1654, in _validate_oapg
_path_to_schemas = super()._validate_oapg(arg, validation_metadata=validation_metadata)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/openapi_evm_api/schemas.py", line 337, in _validate_oapg
raise cls.__get_type_error(
openapi_evm_api.exceptions.ApiTypeError: Invalid type. Required value type is frozendict and passed type was str at ['args[0]']