"""Dataclasses for all structs in the {{contract_name}} contract.

DO NOT EDIT.  This file was generated by pypechain.  See documentation at
https://github.com/delvtech/pypechain """
# super() call methods are generic, while our version adds values & types
# pylint: disable=arguments-differ

# contracts have PascalCase names
# pylint: disable=invalid-name
# contracts control how many attributes and arguments we have in generated code
# pylint: disable=too-many-instance-attributes
# pylint: disable=too-many-arguments
# unable to determine which imports will be used in the generated code
# pylint: disable=unused-import
# we don't need else statement if the other conditionals all have return,
# but it's easier to generate
# pylint: disable=no-else-return
from __future__ import annotations
from dataclasses import dataclass
from web3.types import ABIEvent, ABIEventParams, ABIFunctionParams
{% for imported_contract_name in types_files_imported %}
from . import {{imported_contract_name}}Types as {{imported_contract_name}}
{% endfor %}

{% for struct in structs %}
@dataclass
class {{struct.name}}:
    """{{struct.name}} struct."""
{% for struct_value in struct.values %}
    {{struct_value.name}}: {%if struct_value.is_struct and struct_value.contract_name != contract_name%}{{struct_value.contract_name}}.{%endif%}{{struct_value.python_type}}
{%- endfor %}
{% endfor %}
{% for event in events %}
{{event.name}} = ABIEvent(
    anonymous = {{event.anonymous}},
    inputs = [
{%- for event_input in event.inputs %}
        ABIEventParams(indexed={{event_input.indexed}}, name="{{event_input.name}}", type="{{event_input.solidity_type}}"),
{%- endfor %}
    ],
    name = "{{event.name}}",
    type = "event",
)
{% endfor %}
@dataclass
class ErrorInfo:
    """Custom contract error information."""

    name: str
    selector: str
    signature: str
    inputs: list[ErrorParams]


@dataclass
class ErrorParams:
    """Parameter info for custom contract errors."""

    name: str
    solidity_type: str
    python_type: str

{% for error in errors %}
{{error.name}}Error = ErrorInfo(
    inputs = [
{%- for error_input in error.inputs %}
        ErrorParams(name="{{error_input.name}}", python_type="{{error_input.python_type}}", solidity_type="{{error_input.solidity_type}}"),
{%- endfor %}
    ],
    name = "{{error.name}}",
    selector = "{{error.selector}}",
    signature = "{{error.signature}}",
)
{% endfor %}