You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The initial aim was to use these forks in validity markers (whose arguments are currently string, not fork types). This would allow auto-complete and static type checking.
However, it might be possible to use this enum everywhere instead of importing each fork individually. Currently, we have (which can be a bit cumbersome if importing many forks):
fromethereum_test_forksimportParis, Shanghai
If we define our enum cleverly, we could simply:
fromethereum_test_forksimportForks
and use Forks.Paris and Forks.Shanghai. This is perhaps not quite as compact, but definitely more useful when writing code. We'd need to see if it's possible to modify the enum class to return the fork class object directly, otherwise we'd have to use Forks.Paris.value, which is not acceptable.
Also we'd have a unified way of defining forks in regular code and in validity markers.
The text was updated successfully, but these errors were encountered:
Define an enum that contains all available forks.
The initial aim was to use these forks in validity markers (whose arguments are currently string, not fork types). This would allow auto-complete and static type checking.
However, it might be possible to use this enum everywhere instead of importing each fork individually. Currently, we have (which can be a bit cumbersome if importing many forks):
If we define our enum cleverly, we could simply:
and use
Forks.Paris
andForks.Shanghai
. This is perhaps not quite as compact, but definitely more useful when writing code. We'd need to see if it's possible to modify the enum class to return the fork class object directly, otherwise we'd have to useForks.Paris.value
, which is not acceptable.Also we'd have a unified way of defining forks in regular code and in validity markers.
The text was updated successfully, but these errors were encountered: