"""A web3.py Contract class for the {{contract_name}} contract.

DO NOT EDIT.  This file was generated by pypechain.  See documentation at
https://github.com/delvtech/pypechain"""

# 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

# we don't need else statement if the other conditionals all have return,
# but it's easier to generate
# pylint: disable=no-else-return

# This file is bound to get very long depending on contract sizes.
# pylint: disable=too-many-lines

# methods are overriden with specific arguments instead of generic *args, **kwargs
# pylint: disable=arguments-differ

# consumers have too many opinions on line length
# pylint: disable=line-too-long


from __future__ import annotations

from dataclasses import fields, is_dataclass
from typing import Any, NamedTuple, Tuple, Type, TypeVar, cast, overload
from typing import Iterable, Sequence

from eth_abi.codec import ABICodec
from eth_abi.registry import registry as default_registry
from eth_typing import ChecksumAddress, HexStr
from eth_account.signers.local import LocalAccount
from hexbytes import HexBytes
from typing_extensions import Self
from web3 import Web3
from web3.contract.contract import Contract, ContractFunction, ContractFunctions, ContractConstructor
from web3.contract.contract import ContractEvent, ContractEvents
from web3.exceptions import FallbackNotFound
from web3.types import ABI, BlockIdentifier, CallOverride, TxParams, ABIFunction
from web3.types import EventData
from web3._utils.filters import LogFilter
{% for struct_info in structs_used %}
from .{{struct_info.contract_name}}Types import {{struct_info.name}}
{% endfor %}
{% for contract_type in link_references.contract_types %}
from .{{contract_type}} import {{contract_type}}
{% endfor %}
from .utilities import dataclass_to_tuple, get_abi_input_types, rename_returned_types, tuple_to_dataclass


structs = {
{%- for struct in structs_used %}
    "{{struct.name}}": {{struct.name}},
{%- endfor %}}


{{functions_block}}

{% if has_events %}{{ events_block }}{% endif %}

{% if has_errors %}{{ errors_block }}{% endif %}

{{abi_block}}

{{contract_block}}