Skip to content

Commit

Permalink
feat: InterfaceConstructor.selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdefinitelyahuman committed Sep 11, 2020
1 parent 96bdb32 commit 508d6eb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions brownie/network/contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,9 @@ class InterfaceConstructor:
def __init__(self, name: str, abi: List) -> None:
self._name = name
self.abi = abi
self.selectors = {
build_function_selector(i): i["name"] for i in self.abi if i["type"] == "function"
}

def __call__(self, address: str, owner: Optional[AccountsType] = None) -> "Contract":
return Contract.from_abi(self._name, address, self.abi, owner)
Expand Down

0 comments on commit 508d6eb

Please sign in to comment.