Skip to content

Commit

Permalink
js,py: sync arguments extractor with rust implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
cdump committed Jul 23, 2024
1 parent e59004f commit e1ef1b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion evmole/arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def function_arguments(code: bytes | str, selector: bytes | str, gas_limit: int
args.set_tname(path, None, 'bytes', 10)
elif mult == 2:
args.set_tname(path, None, 'string', 20)
elif mult % 32 == 0 and 32 <= mult <= 3200:
elif mult % 32 == 0 and 32 <= mult < 3200:
args.set_info(path, InfoValArray(mult // 32))

for el in vm.stack.data:
Expand Down
2 changes: 1 addition & 1 deletion js/src/arguments.js
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ export function functionArguments(code, selector, gas_limit = 5e4) {
args.setTname(rl.path, null, 'bytes', 10)
} else if (mult == 2n) {
args.setTname(rl.path, null, 'string', 20)
} else if (mult % 32n === 0n && 32n <= mult && mult <= 3200n) {
} else if (mult % 32n === 0n && 32n <= mult && mult < 3200n) {
args.setInfo(rl.path, new InfoValArray(Number(mult / 32n)))

const shouldUpdate = (v) => v.offset == 0 && v.path == rl.path && v.add_val == 0
Expand Down

0 comments on commit e1ef1b2

Please sign in to comment.