dipdup-io / dipdup

Modular framework for creating selective indexers and featureful backends for dapps
https://dipdup.io
MIT License
92 stars 52 forks source link

"Transaction parameter is empty" error raised during indexing (7.0.0rc2) #769

Closed TristanAllaire closed 1 year ago

TristanAllaire commented 1 year ago

Steps to reproduce: Some of the entrypoints of the contracts I indexed don't require parameters to work. When operations are caught on them, they crash and return this error:

FrameworkException('Transaction parameter is empty')

I saw that it came from the indexes/tezos_tzkt_operations/matcher.py file. Line 58:

if not operation_data.parameter_json:
  raise FrameworkException('Transaction parameter is empty')

This exception is raised even if the "parameter_json" attribute exists on the object but is equal to {}. In order to fix the issue, I replace the condition with:

if operation_data.parameter_json is None:

Doing this fixed the crash on my side but is it what you were trying to check in this file?

Environment

droserasprout commented 1 year ago

Yup, that's exactly what you think it is, an incorrect check. Thanks!