Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contract: Handle TypeError #2300

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions web3/contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -964,8 +964,8 @@ def call(
self.contract_abi,
self.abi,
state_override,
*self.args,
**self.kwargs
*self.args is self.args else [],
**self.kwargs if self.kwargs else {}
)

def transact(self, transaction: Optional[TxParams] = None) -> HexBytes:
Expand Down Expand Up @@ -1001,8 +1001,8 @@ def transact(self, transaction: Optional[TxParams] = None) -> HexBytes:
transact_transaction,
self.contract_abi,
self.abi,
*self.args,
**self.kwargs
*self.args is self.args else [],
**self.kwargs if self.kwargs else {}
)

def estimateGas(
Expand Down Expand Up @@ -1044,8 +1044,8 @@ def estimateGas(
self.contract_abi,
self.abi,
block_identifier,
*self.args,
**self.kwargs
*self.args is self.args else [],
**self.kwargs if self.kwargs else {}
)

def buildTransaction(self, transaction: Optional[TxParams] = None) -> TxParams:
Expand Down Expand Up @@ -1083,8 +1083,8 @@ def buildTransaction(self, transaction: Optional[TxParams] = None) -> TxParams:
built_transaction,
self.contract_abi,
self.abi,
*self.args,
**self.kwargs
*self.args is self.args else [],
**self.kwargs if self.kwargs else {}
)

@combomethod
Expand Down