Skip to content

Commit

Permalink
Address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
rohan-agarwal-coinbase committed Sep 30, 2024
1 parent 55bf366 commit ebc9c08
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions cdp/smart_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __repr__(self) -> str:
"""Return a string representation of the Type."""
return str(self)

class TokenContractOptions(dict[str, Any]):
class TokenContractOptions(dict):
"""Options for token contracts (ERC20)."""

def __init__(self, name: str, symbol: str, total_supply: str):
Expand All @@ -48,7 +48,7 @@ def __init__(self, name: str, symbol: str, total_supply: str):
"""
super().__init__(name=name, symbol=symbol, total_supply=total_supply)

class NFTContractOptions(dict[str, Any]):
class NFTContractOptions(dict):
"""Options for NFT contracts (ERC721)."""

def __init__(self, name: str, symbol: str, base_uri: str):
Expand All @@ -62,7 +62,7 @@ def __init__(self, name: str, symbol: str, base_uri: str):
"""
super().__init__(name=name, symbol=symbol, base_uri=base_uri)

class MultiTokenContractOptions(dict[str, Any]):
class MultiTokenContractOptions(dict):
"""Options for multi-token contracts (ERC1155)."""

def __init__(self, uri: str):
Expand Down Expand Up @@ -150,10 +150,7 @@ def type(self) -> Type:
ValueError: If the smart contract type is unknown.
"""
try:
return self.Type(self._model.type)
except ValueError as err:
raise ValueError(f"Unknown smart contract type: {self._model.type}") from err
return self.Type(self._model.type)

@property
def options(self) -> dict[str, Any]:
Expand Down

0 comments on commit ebc9c08

Please sign in to comment.