Skip to content

Commit 6d92f5f

Browse files
author
Stuart Reed
committed
Pass is_async
1 parent 5956275 commit 6d92f5f

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

web3/_utils/contracts.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ def encode_transaction_data(
288288
fn_arguments,
289289
data=fn_selector,
290290
abi_codec=w3.codec,
291+
is_async=w3.provider.is_async,
291292
data_normalizers=[abi_ens_resolver(w3)],
292293
strict=w3.strict_bytes_type_checking,
293294
)

web3/contract/base_contract.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,7 @@ def _encode_transaction_data(cls) -> HexStr:
619619
cls.arguments,
620620
data=cls.selector,
621621
abi_codec=cls.w3.codec,
622+
is_async=cls.w3.provider.is_async,
622623
data_normalizers=[abi_ens_resolver(cls.w3)],
623624
strict=cls.w3.strict_bytes_type_checking,
624625
)
@@ -766,6 +767,7 @@ def encode_abi(
766767
fn_arguments,
767768
data,
768769
abi_codec=cls.w3.codec,
770+
is_async=cls.w3.provider.is_async,
769771
data_normalizers=[abi_ens_resolver(cls.w3)],
770772
strict=cls.w3.strict_bytes_type_checking,
771773
)
@@ -913,6 +915,7 @@ def _encode_constructor_data(
913915
arguments,
914916
data=cls.bytecode,
915917
abi_codec=cls.w3.codec,
918+
is_async=cls.w3.provider.is_async,
916919
data_normalizers=[abi_ens_resolver(cls.w3)],
917920
strict=cls.w3.strict_bytes_type_checking,
918921
)
@@ -1102,6 +1105,7 @@ def _encode_data_in_transaction(self, *args: Any, **kwargs: Any) -> HexStr:
11021105
arguments,
11031106
data=self.bytecode,
11041107
abi_codec=self.w3.codec,
1108+
is_async=self.w3.provider.is_async,
11051109
data_normalizers=[abi_ens_resolver(self.w3)],
11061110
strict=self.w3.strict_bytes_type_checking,
11071111
)

0 commit comments

Comments
 (0)