2018-08-03 11:55:44 +00:00
|
|
|
# NestedArrayFunctionCallDecoder
|
|
|
|
|
|
|
|
## buggy
|
|
|
|
|
|
|
|
function f() pure returns (uint[2][2]) { }
|
|
|
|
|
|
|
|
--
|
|
|
|
|
|
|
|
function f() returns (uint[2][2] a) { }
|
|
|
|
|
|
|
|
--
|
|
|
|
|
|
|
|
function f() returns (uint x, uint[200][2] a) { }
|
|
|
|
|
|
|
|
--
|
|
|
|
|
|
|
|
function f() returns (uint[200][2] a, uint x) { }
|
|
|
|
|
|
|
|
--
|
|
|
|
|
|
|
|
function f() returns (uint[200][2] a, uint x);
|
|
|
|
|
|
|
|
--
|
|
|
|
|
|
|
|
function f() returns (
|
|
|
|
uint
|
|
|
|
[
|
|
|
|
200
|
|
|
|
]
|
|
|
|
[2]
|
|
|
|
a, uint x);
|
|
|
|
|
|
|
|
--
|
|
|
|
|
|
|
|
function f() returns (
|
|
|
|
uint
|
|
|
|
[
|
|
|
|
ContractName.ConstantName
|
|
|
|
]
|
|
|
|
[2]
|
|
|
|
a, uint x);
|
|
|
|
|
|
|
|
## fine
|
|
|
|
|
|
|
|
function f() returns (uint[2]) { }
|
|
|
|
|
|
|
|
--
|
|
|
|
|
|
|
|
function f() public pure returns (uint[2][] a) { }
|
|
|
|
|
|
|
|
--
|
|
|
|
|
|
|
|
function f() public pure returns (uint[ 2 ] [ ] a) { }
|
|
|
|
|
|
|
|
--
|
|
|
|
|
|
|
|
function f() public pure returns (uint x, uint[] a) { }
|
|
|
|
|
|
|
|
--
|
|
|
|
|
|
|
|
function f(uint[2][2]) { }
|
|
|
|
|
|
|
|
--
|
|
|
|
|
|
|
|
function f() m(uint[2][2]) { }
|
|
|
|
|
|
|
|
--
|
|
|
|
|
|
|
|
function f() returns (uint, uint) { uint[2][2] memory x; }
|
2018-08-21 14:09:53 +00:00
|
|
|
|
2018-09-06 15:30:51 +00:00
|
|
|
# ExpExponentCleanup
|
|
|
|
|
|
|
|
## buggy
|
|
|
|
|
|
|
|
x ** y
|
|
|
|
|
|
|
|
--
|
|
|
|
|
|
|
|
x ** uint8(y)
|
|
|
|
|
|
|
|
--
|
|
|
|
|
|
|
|
x**y
|
|
|
|
|
|
|
|
## fine
|
|
|
|
|
|
|
|
x ** 2
|
|
|
|
|
|
|
|
--
|
|
|
|
|
|
|
|
x**2
|
|
|
|
|
|
|
|
--
|
|
|
|
|
|
|
|
x**200
|
|
|
|
|
|
|
|
--
|
|
|
|
|
|
|
|
/** bla **/
|
|
|
|
|
|
|
|
--
|
|
|
|
|
|
|
|
/**/
|
|
|
|
|
2018-08-21 14:09:53 +00:00
|
|
|
# EventStructWrongData
|
|
|
|
|
|
|
|
## buggy
|
|
|
|
|
|
|
|
pragma experimental ABIEncoderV2;
|
|
|
|
contract C
|
|
|
|
{
|
|
|
|
struct S { uint x; }
|
|
|
|
event E(S);
|
|
|
|
event F(S);
|
|
|
|
enum A { B, C }
|
|
|
|
event G(A);
|
|
|
|
function f(S s);
|
|
|
|
}
|
|
|
|
|
|
|
|
--
|
|
|
|
|
|
|
|
pragma experimental ABIEncoderV2;
|
|
|
|
contract C
|
|
|
|
{
|
|
|
|
struct S { uint x; }
|
|
|
|
event E(S indexed);
|
|
|
|
event F(uint, S, bool);
|
|
|
|
}
|
|
|
|
|
|
|
|
## fine
|
|
|
|
|
|
|
|
pragma experimental ABIEncoderV2;
|
|
|
|
contract C
|
|
|
|
{
|
|
|
|
struct S { uint x; }
|
|
|
|
enum A { B, C }
|
|
|
|
event G(A);
|
|
|
|
}
|
|
|
|
|
|
|
|
--
|
|
|
|
|
|
|
|
pragma experimental ABIEncoderV2;
|
|
|
|
contract C
|
|
|
|
{
|
|
|
|
struct S { uint x; }
|
|
|
|
function f(S s);
|
|
|
|
S s1;
|
|
|
|
}
|