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 bytes_required function in sfs_generator/asm_bytecode.py may throw error due to wrongly formatted hexadecimal starting with x prefix
ValueError: invalid literal forint() with base 16: 'xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffff27618'
This happens due to int(string, 16) expects hexadecimal to start with 0x or without prefix at all
I'm not sure where the issue is coming from, I've used --asm-json (--singe-json) mod with quite large contract and the thrown hexadecimal literal is not presented in the asmjson
To resolve the issue, it is necessary to catch where wrong formatted hex value is coming from
The following change can be applied as a hotfix
if is_push0(self.disasm, self.value):
return 1
elif self.disasm == "PUSH":
+ if len(self.value) >= 1 and self.value[0] == "x":+ self.value = self.value[1:]
decimal_value = int(self.value, 16)
else:
decimal_value = None
The text was updated successfully, but these errors were encountered:
The
bytes_required
function insfs_generator/asm_bytecode.py
may throw error due to wrongly formatted hexadecimal starting withx
prefixThis happens due to
int(string, 16)
expects hexadecimal to start with0x
or without prefix at allI'm not sure where the issue is coming from, I've used
--asm-json (--singe-json)
mod with quite large contract and the thrown hexadecimal literal is not presented in the asmjsonTo resolve the issue, it is necessary to catch where wrong formatted hex value is coming from
The following change can be applied as a hotfix
The text was updated successfully, but these errors were encountered: