Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberthirst committed Apr 15, 2024
1 parent a7bb73a commit ab874ac
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/functional/builtins/codegen/test_abi_decode.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,10 +486,10 @@ def f(x: Bytes[32 * 3]):
assert decoded_y1 != decoded_y2
"""
c = get_contract(code)
data = (0xd45754f8).to_bytes(4, "big")
data = (0xD45754F8).to_bytes(4, "big")
data += (0x20).to_bytes(32, "big")
data += (0x60).to_bytes(32, "big")
data += (0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa0).to_bytes(32, "big")
data += (0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA0).to_bytes(32, "big")
with tx_failed():
w3.eth.send_transaction({"to": c.address, "data": data})

Expand All @@ -505,13 +505,13 @@ def f(x: Bytes[32 * 5]):
decoded_y1 = _abi_decode(y, DynArray[uint256, 3])
"""
c = get_contract(code)
data = (0xd45754f8).to_bytes(4, "big")
data += (0x20).to_bytes(32, "big") # tuple head
data += (0xA0).to_bytes(32, "big") # parent array head
data = (0xD45754F8).to_bytes(4, "big")
data += (0x20).to_bytes(32, "big") # tuple head
data += (0xA0).to_bytes(32, "big") # parent array head
# head should be 20 and thus the decoding func will try to decode 1 word
# over the end of the input data
# _getelemptr_abi_helper will revert due to clamping
data += (0x40).to_bytes(32, "big") # inner array head
data += (0x40).to_bytes(32, "big") # inner array head
# inner array payload: length: 3 | idx0: 3 | idx1: 3 | idx2: 3
data += (0x3).to_bytes(32, "big") * 4
with tx_failed():
Expand Down

0 comments on commit ab874ac

Please sign in to comment.