Skip to content
This repository was archived by the owner on May 3, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ packages = [
{include = "thirdweb"},
]
readme = "README.md"
version = "3.1.0"
version = "3.1.1"

[tool.poetry.dependencies]
python = ">=3.7.1"
Expand Down
4 changes: 4 additions & 0 deletions thirdweb/contracts/custom.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from typing import Any, Final, Optional, cast
from eth_typing import Address
from thirdweb.core.classes.contract_events import ContractEvents

from web3 import Web3
from web3.contract import ContractFunctions, ContractFunction
Expand Down Expand Up @@ -74,6 +75,7 @@ class CustomContract(BaseContract[Any]):
contract_type: Final[ContractType] = ContractType.CUSTOM

functions: ContractFunctions
events: ContractEvents

def __init__(
self,
Expand Down Expand Up @@ -105,6 +107,8 @@ def __init__(
self.erc721 = self._detect_erc_721()
self.erc1155 = self._detect_erc_1155()

self.events = ContractEvents(contract_wrapper)

def call(self, fn: str, *args) -> Any:
func = cast(ContractFunction, getattr(self.functions, fn, None))
if func is None:
Expand Down