Skip to content

Commit

Permalink
fix[tool]: update InterfaceT.__str__ implementation (#4205)
Browse files Browse the repository at this point in the history
this doesn't affect anything in vyper codebase, but affects the
serialization of interface types for tooling (including titanoboa)
  • Loading branch information
charles-cooper authored Aug 9, 2024
1 parent cefb0c5 commit f909d6e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/functional/syntax/test_external_calls.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def bar():
extcall Foo(msg.sender)
""",
StructureException,
"Function `type(interface Foo)` cannot be called without assigning the result",
"Function `type(Foo)` cannot be called without assigning the result",
None,
),
]
Expand Down
3 changes: 3 additions & 0 deletions vyper/semantics/types/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ def getter_signature(self):
def abi_type(self) -> ABIType:
return ABI_Address()

def __str__(self):
return self._id

def __repr__(self):
return f"interface {self._id}"

Expand Down

0 comments on commit f909d6e

Please sign in to comment.