# Ethereum gas usage constants; for more details, see
# page 27 in https://ethereum.github.io/yellowpaper/paper.pdf.
GAS_PER_MEMORY_BYTE = 16
WORD_WIDTH = 32
GAS_PER_MEMORY_WORD = GAS_PER_MEMORY_BYTE * WORD_WIDTH
SHARP_ADDITIONAL_GAS_PER_MEMORY_WORD = 100  # This value is not accurate.
SHARP_GAS_PER_MEMORY_WORD = GAS_PER_MEMORY_WORD + SHARP_ADDITIONAL_GAS_PER_MEMORY_WORD
GAS_PER_ZERO_TO_NONZERO_STORAGE_SET = 20000
GAS_PER_COLD_STORAGE_ACCESS = 2100
GAS_PER_NONZERO_TO_INT_STORAGE_SET = 2900
GAS_PER_COUNTER_DECREASE = GAS_PER_COLD_STORAGE_ACCESS + GAS_PER_NONZERO_TO_INT_STORAGE_SET
GAS_PER_LOG = 375
GAS_PER_LOG_TOPIC = 375
GAS_PER_LOG_DATA_BYTE = 8
GAS_PER_LOG_DATA_WORD = GAS_PER_LOG_DATA_BYTE * WORD_WIDTH
