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
* separate instruction tables for pre-byzantium, byzantium and constantinopole.
* added new optional argument to CLI (--fork, -f) that accepts fork to be used.
* it is possible to select fork by name or by block number.
* introduced default fork selection by introducing DEFAULT_FORK constant
* added 3 new test cases, one per supported fork
* fixed test_ADD_1 test case
All functions and evmasm are fully backwards compatible. If no fork is selected, "byzantium" is chosen by default.
Example usage:
```
evmasm -t -f 0
evmasm -t -f 3700000
evmasm -t -f 4369999
evmasm -t -f pre-byzantium
evmasm -t
evmasm -t -f 4370000
evmasm -t -f 4370001
evmasm -t -f byzantium
evmasm -t -f 9999999 (block number to be updated after mainnet launch)
evmasm -t -f constantinople
```
Error handling:
```
$ evmasm -t -f a
Wrong fork name or block number. Please provide an integer or one of ['pre-byzantium', 'byzantium', 'constantinople'].
$ evmasm -t -f constantinoplee
Wrong fork name or block number. Please provide an integer or one of ['pre-byzantium', 'byzantium', 'constantinople'].
$ evmasm -t -f 1.2
Wrong fork name or block number. Please provide an integer or one of ['pre-byzantium', 'byzantium', 'constantinople'].
$ evmasm -t -f
usage: evmasm [-h] (-a | -d | -t) [-bi] [-bo] [-i [INPUT]] [-o [OUTPUT]]
[-f FORK]
evmasm: error: argument -f/--fork: expected 1 argument
```
Refs: #7
0 commit comments