Skip to content

Commit

Permalink
Set version v4.21.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Uxio0 committed Jun 29, 2023
1 parent c756235 commit 0f18446
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion safe_transaction_service/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "4.21.0"
__version__ = "4.21.1"
__version_info__ = tuple(
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
Expand Down
8 changes: 5 additions & 3 deletions safe_transaction_service/contracts/tx_decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,8 +539,10 @@ def get_contract_abi(
:param address: Contract address
:return: Dictionary of function selects with ABIFunction if found, `None` otherwise
"""
abis = ContractAbi.objects.filter(contracts__address=address).values_list(
"abi", flat=True
abis = (
ContractAbi.objects.filter(contracts__address=address)
.order_by("relevance")
.values_list("abi", flat=True)
)
if abis:
return self._generate_selectors_with_abis_from_abi(abis[0])
Expand All @@ -564,7 +566,7 @@ def get_abi_function(
and selector in contract_selectors_with_abis
):
# If the selector is available in the abi specific for the address we will use that one
# Otherwise we fallback to the general abi that matches the selector
# Otherwise we fall back to the general abi that matches the selector
return contract_selectors_with_abis[selector]
return self.fn_selectors_with_abis[selector]

Expand Down

0 comments on commit 0f18446

Please sign in to comment.