diff --git a/packages/abi-gen-templates/Python/contract.handlebars b/packages/abi-gen-templates/Python/contract.handlebars index 7daf6530e9..e317ae955d 100644 --- a/packages/abi-gen-templates/Python/contract.handlebars +++ b/packages/abi-gen-templates/Python/contract.handlebars @@ -51,6 +51,10 @@ class {{contractName}}: """Wrapper class for {{contractName}} Solidity contract.{{docBytesIfNecessary ABIString}}""" {{#each methods}} {{toPythonIdentifier this.languageSpecificName}}: {{toPythonClassname this.languageSpecificName}}Method + """Constructor-initialized instance of + :class:`{{toPythonClassname this.languageSpecificName}}Method`. + """ + {{/each}} def __init__( diff --git a/packages/abi-gen/test-cli/expected-output/python/abi_gen_dummy/__init__.py b/packages/abi-gen/test-cli/expected-output/python/abi_gen_dummy/__init__.py index bb75c0f690..26841a4b24 100644 --- a/packages/abi-gen/test-cli/expected-output/python/abi_gen_dummy/__init__.py +++ b/packages/abi-gen/test-cli/expected-output/python/abi_gen_dummy/__init__.py @@ -1367,34 +1367,150 @@ class AbiGenDummy: which can be accomplished via `str.encode("utf_8")`:code:. """ simple_require: SimpleRequireMethod + """Constructor-initialized instance of + :class:`SimpleRequireMethod`. + """ + accepts_an_array_of_bytes: AcceptsAnArrayOfBytesMethod + """Constructor-initialized instance of + :class:`AcceptsAnArrayOfBytesMethod`. + """ + simple_input_simple_output: SimpleInputSimpleOutputMethod + """Constructor-initialized instance of + :class:`SimpleInputSimpleOutputMethod`. + """ + withdraw: WithdrawMethod + """Constructor-initialized instance of + :class:`WithdrawMethod`. + """ + multi_input_multi_output: MultiInputMultiOutputMethod + """Constructor-initialized instance of + :class:`MultiInputMultiOutputMethod`. + """ + ecrecover_fn: EcrecoverFnMethod + """Constructor-initialized instance of + :class:`EcrecoverFnMethod`. + """ + accepts_bytes: AcceptsBytesMethod + """Constructor-initialized instance of + :class:`AcceptsBytesMethod`. + """ + no_input_simple_output: NoInputSimpleOutputMethod + """Constructor-initialized instance of + :class:`NoInputSimpleOutputMethod`. + """ + revert_with_constant: RevertWithConstantMethod + """Constructor-initialized instance of + :class:`RevertWithConstantMethod`. + """ + simple_revert: SimpleRevertMethod + """Constructor-initialized instance of + :class:`SimpleRevertMethod`. + """ + method_using_nested_struct_with_inner_struct_not_used_elsewhere: MethodUsingNestedStructWithInnerStructNotUsedElsewhereMethod + """Constructor-initialized instance of + :class:`MethodUsingNestedStructWithInnerStructNotUsedElsewhereMethod`. + """ + nested_struct_output: NestedStructOutputMethod + """Constructor-initialized instance of + :class:`NestedStructOutputMethod`. + """ + require_with_constant: RequireWithConstantMethod + """Constructor-initialized instance of + :class:`RequireWithConstantMethod`. + """ + with_address_input: WithAddressInputMethod + """Constructor-initialized instance of + :class:`WithAddressInputMethod`. + """ + struct_input: StructInputMethod + """Constructor-initialized instance of + :class:`StructInputMethod`. + """ + non_pure_method: NonPureMethodMethod + """Constructor-initialized instance of + :class:`NonPureMethodMethod`. + """ + complex_input_complex_output: ComplexInputComplexOutputMethod + """Constructor-initialized instance of + :class:`ComplexInputComplexOutputMethod`. + """ + no_input_no_output: NoInputNoOutputMethod + """Constructor-initialized instance of + :class:`NoInputNoOutputMethod`. + """ + simple_pure_function_with_input: SimplePureFunctionWithInputMethod + """Constructor-initialized instance of + :class:`SimplePureFunctionWithInputMethod`. + """ + non_pure_method_that_returns_nothing: NonPureMethodThatReturnsNothingMethod + """Constructor-initialized instance of + :class:`NonPureMethodThatReturnsNothingMethod`. + """ + simple_pure_function: SimplePureFunctionMethod + """Constructor-initialized instance of + :class:`SimplePureFunctionMethod`. + """ + nested_struct_input: NestedStructInputMethod + """Constructor-initialized instance of + :class:`NestedStructInputMethod`. + """ + method_returning_multiple_values: MethodReturningMultipleValuesMethod + """Constructor-initialized instance of + :class:`MethodReturningMultipleValuesMethod`. + """ + method_returning_array_of_structs: MethodReturningArrayOfStructsMethod + """Constructor-initialized instance of + :class:`MethodReturningArrayOfStructsMethod`. + """ + struct_output: StructOutputMethod + """Constructor-initialized instance of + :class:`StructOutputMethod`. + """ + pure_function_with_constant: PureFunctionWithConstantMethod + """Constructor-initialized instance of + :class:`PureFunctionWithConstantMethod`. + """ + simple_input_no_output: SimpleInputNoOutputMethod + """Constructor-initialized instance of + :class:`SimpleInputNoOutputMethod`. + """ + overloaded_method2: OverloadedMethod2Method + """Constructor-initialized instance of + :class:`OverloadedMethod2Method`. + """ + overloaded_method1: OverloadedMethod1Method + """Constructor-initialized instance of + :class:`OverloadedMethod1Method`. + """ + def __init__( self, diff --git a/packages/abi-gen/test-cli/expected-output/python/test_lib_dummy/__init__.py b/packages/abi-gen/test-cli/expected-output/python/test_lib_dummy/__init__.py index cf00125862..84d129df11 100644 --- a/packages/abi-gen/test-cli/expected-output/python/test_lib_dummy/__init__.py +++ b/packages/abi-gen/test-cli/expected-output/python/test_lib_dummy/__init__.py @@ -137,7 +137,15 @@ def estimate_gas(self, x: int, tx_params: Optional[TxParams] = None) -> int: class TestLibDummy: """Wrapper class for TestLibDummy Solidity contract.""" public_add_constant: PublicAddConstantMethod + """Constructor-initialized instance of + :class:`PublicAddConstantMethod`. + """ + public_add_one: PublicAddOneMethod + """Constructor-initialized instance of + :class:`PublicAddOneMethod`. + """ + def __init__( self,