diff options
author | weimumu <934657014@qq.com> | 2018-12-17 16:50:52 +0800 |
---|---|---|
committer | Guillaume Ballet <gballet@gmail.com> | 2018-12-17 16:50:52 +0800 |
commit | 3ad73443c7a96c928577234df5c742d53f3293ef (patch) | |
tree | 6fefd22f93c2cf96bdae53031ee9f4b714a62f8c /accounts/abi/unpack_test.go | |
parent | 7dbb075c07511ccdfd8b428cce1adbc6c146eb18 (diff) | |
download | go-tangerine-3ad73443c7a96c928577234df5c742d53f3293ef.tar go-tangerine-3ad73443c7a96c928577234df5c742d53f3293ef.tar.gz go-tangerine-3ad73443c7a96c928577234df5c742d53f3293ef.tar.bz2 go-tangerine-3ad73443c7a96c928577234df5c742d53f3293ef.tar.lz go-tangerine-3ad73443c7a96c928577234df5c742d53f3293ef.tar.xz go-tangerine-3ad73443c7a96c928577234df5c742d53f3293ef.tar.zst go-tangerine-3ad73443c7a96c928577234df5c742d53f3293ef.zip |
fix slice unpack bug in accounts/abi (#18321)
* fix slice unpack bug in accounts/abi
Diffstat (limited to 'accounts/abi/unpack_test.go')
-rw-r--r-- | accounts/abi/unpack_test.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/accounts/abi/unpack_test.go b/accounts/abi/unpack_test.go index 97552b90c..29ed4522c 100644 --- a/accounts/abi/unpack_test.go +++ b/accounts/abi/unpack_test.go @@ -192,6 +192,11 @@ var unpackTests = []unpackTest{ want: [][2]uint8{{1, 2}}, }, { + def: `[{"type": "uint8[2][]"}]`, + enc: "000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002", + want: [][2]uint8{{1, 2}, {1, 2}}, + }, + { def: `[{"type": "uint16[]"}]`, enc: "0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002", want: []uint16{1, 2}, |