-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- feat(translate.py): add support for ContractCreation action type
- feat(action_type.py): add ContractCreation action type - feat(base.py): add base Action class and EventHandleFunc type - feat(tx_type.py): update actions field in TaggedTx to accept List[Action]
- Loading branch information
1 parent
1e1a82c
commit c2a1fe1
Showing
5 changed files
with
59 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from abc import abstractmethod | ||
from dataclasses import dataclass | ||
from typing import Any | ||
from typing import Callable | ||
from typing import Dict | ||
from typing import Optional | ||
|
||
|
||
@dataclass(frozen=True) | ||
class Action: | ||
@property | ||
@abstractmethod | ||
def action(self) -> str: | ||
raise NotImplementedError | ||
|
||
@abstractmethod | ||
def __str__(self): | ||
raise NotImplementedError | ||
|
||
def dict(self): | ||
return vars(self) | ||
|
||
|
||
EventHandleFunc = Callable[[Dict[str, Any]], Optional[Action]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters