Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit 6ff6662

Browse files
author
Jan Xie
committed
test for encoding prefixed address in abi
1 parent ff161ed commit 6ff6662

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ethereum/tests/test_abi.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ def test_abi_decode_single_bytes():
4141
typ = ['bytes', '', []]
4242
assert b'\x01\x02' == abi.decode_single(typ, abi.encode_single(typ, '\x01\x02'))
4343

44+
def test_abi_encode_single_prefixed_address():
45+
prefixed_address = '0x' + '0'*40
46+
assert abi.encode_single(['address', '', []], prefixed_address) == b'\x00' * 32
47+
4448
# SETUP TESTS IN GLOBAL NAME SPACE
4549
def gen_func(filename, testname, testdata):
4650
return lambda: do_test_state(filename, testname, testdata)

0 commit comments

Comments
 (0)