Skip to content

Commit

Permalink
Add constants to common.py, comment
Browse files Browse the repository at this point in the history
  • Loading branch information
sifislag committed Nov 25, 2024
1 parent 603d3bb commit 5cd05e1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions logic/types_defs.dl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#define CheckIsStackIndex(v) ((v) >= 0, (v) < MAX_STACK_HEIGHT)


// The following 4 constants as also defined in src/common.py
#define FUNCTION_SELECTOR "0x0"

#define FALLBACK_FUNCTION_SIGHASH "0x00000000"
Expand Down
6 changes: 6 additions & 0 deletions src/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@

SOUFFLE_COMPILED_SUFFIX = '_compiled'

# The following 4 constants are also defined in `logic/types_defs.dl`
FUNCTION_SELECTOR = "0x0"
FALLBACK_FUNCTION_SIGHASH = "0x00000000"
RECEIVE_FUNCTION_SIGHASH = "0xeeeeeeee"
FUNCTION_SELECTOR_SIGHASH = "0xff5e1ec7"

log = lambda msg: logging.log(logging.INFO + 1, msg)
log_debug = lambda msg: logging.log(logging.DEBUG, msg)

Expand Down

0 comments on commit 5cd05e1

Please sign in to comment.