Skip to content

Commit

Permalink
fix: make selector a property on ConstructorABI (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey authored Dec 14, 2022
1 parent 941578f commit feb1032
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions ethpm_types/abi.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ def signature(self) -> str:
input_args = ", ".join(i.signature for i in self.inputs)
return f"constructor({input_args})"

@property
def selector(self) -> str:
"""
String representing the constructor selector.
Expand Down
2 changes: 1 addition & 1 deletion tests/test_abi.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ def test_constructor_selector():
type="constructor",
inputs=[ABIType(name="contract_address", type="address", internalType="address")],
)
assert constructor.selector() == "constructor(address)"
assert constructor.selector == "constructor(address)"

0 comments on commit feb1032

Please sign in to comment.