From 7569131faa6b5103b7a5d2c2c4e7b98a7b8daf1b Mon Sep 17 00:00:00 2001 From: alpharush <0xalpharush@protonmail.com> Date: Mon, 9 Jan 2023 14:23:37 -0600 Subject: [PATCH] fix type conversion of alias so library function can be found --- .../visitors/slithir/expression_to_slithir.py | 9 +++++-- .../using-for-0.8.8.sol-0.8.10-compact.zip | Bin 0 -> 3526 bytes .../using-for-0.8.8.sol-0.8.11-compact.zip | Bin 0 -> 3522 bytes .../using-for-0.8.8.sol-0.8.12-compact.zip | Bin 0 -> 3526 bytes .../using-for-0.8.8.sol-0.8.13-compact.zip | Bin 0 -> 3523 bytes .../using-for-0.8.8.sol-0.8.14-compact.zip | Bin 0 -> 3521 bytes .../using-for-0.8.8.sol-0.8.15-compact.zip | Bin 0 -> 3522 bytes .../using-for-0.8.8.sol-0.8.8-compact.zip | Bin 0 -> 3501 bytes .../using-for-0.8.8.sol-0.8.10-compact.json | 11 +++++++++ .../using-for-0.8.8.sol-0.8.11-compact.json | 11 +++++++++ .../using-for-0.8.8.sol-0.8.12-compact.json | 11 +++++++++ .../using-for-0.8.8.sol-0.8.13-compact.json | 11 +++++++++ .../using-for-0.8.8.sol-0.8.14-compact.json | 11 +++++++++ .../using-for-0.8.8.sol-0.8.15-compact.json | 11 +++++++++ .../using-for-0.8.8.sol-0.8.8-compact.json | 11 +++++++++ .../using-for-0.8.8.sol | 22 ++++++++++++++++++ tests/test_ast_parsing.py | 1 + 17 files changed, 107 insertions(+), 2 deletions(-) create mode 100644 tests/ast-parsing/compile/user_defined_value_type/using-for-0.8.8.sol-0.8.10-compact.zip create mode 100644 tests/ast-parsing/compile/user_defined_value_type/using-for-0.8.8.sol-0.8.11-compact.zip create mode 100644 tests/ast-parsing/compile/user_defined_value_type/using-for-0.8.8.sol-0.8.12-compact.zip create mode 100644 tests/ast-parsing/compile/user_defined_value_type/using-for-0.8.8.sol-0.8.13-compact.zip create mode 100644 tests/ast-parsing/compile/user_defined_value_type/using-for-0.8.8.sol-0.8.14-compact.zip create mode 100644 tests/ast-parsing/compile/user_defined_value_type/using-for-0.8.8.sol-0.8.15-compact.zip create mode 100644 tests/ast-parsing/compile/user_defined_value_type/using-for-0.8.8.sol-0.8.8-compact.zip create mode 100644 tests/ast-parsing/expected/user_defined_value_type/using-for-0.8.8.sol-0.8.10-compact.json create mode 100644 tests/ast-parsing/expected/user_defined_value_type/using-for-0.8.8.sol-0.8.11-compact.json create mode 100644 tests/ast-parsing/expected/user_defined_value_type/using-for-0.8.8.sol-0.8.12-compact.json create mode 100644 tests/ast-parsing/expected/user_defined_value_type/using-for-0.8.8.sol-0.8.13-compact.json create mode 100644 tests/ast-parsing/expected/user_defined_value_type/using-for-0.8.8.sol-0.8.14-compact.json create mode 100644 tests/ast-parsing/expected/user_defined_value_type/using-for-0.8.8.sol-0.8.15-compact.json create mode 100644 tests/ast-parsing/expected/user_defined_value_type/using-for-0.8.8.sol-0.8.8-compact.json create mode 100644 tests/ast-parsing/user_defined_value_type/using-for-0.8.8.sol diff --git a/slither/visitors/slithir/expression_to_slithir.py b/slither/visitors/slithir/expression_to_slithir.py index 3c4595b92..66aa43ee6 100644 --- a/slither/visitors/slithir/expression_to_slithir.py +++ b/slither/visitors/slithir/expression_to_slithir.py @@ -282,10 +282,15 @@ class ExpressionToSlithIR(ExpressionVisitor): and expression_called.member_name in ["wrap", "unwrap"] and len(args) == 1 ): + # wrap: underlying_type -> alias + # unwrap: alias -> underlying_type + dest_type = ( + called if expression_called.member_name == "wrap" else called.underlying_type + ) val = TemporaryVariable(self._node) - var = TypeConversion(val, args[0], called) + var = TypeConversion(val, args[0], dest_type) var.set_expression(expression) - val.set_type(called) + val.set_type(dest_type) self._result.append(var) set_val(expression, val) diff --git a/tests/ast-parsing/compile/user_defined_value_type/using-for-0.8.8.sol-0.8.10-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/using-for-0.8.8.sol-0.8.10-compact.zip new file mode 100644 index 0000000000000000000000000000000000000000..2dedfd0a66c31fed984fda23bfe51f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CW+h!H!3)Pus3wuX;KdF%PdjwFjE0WLPxubHso8fk@V#LRta)C=ad6c zbtPMAt89;hFGmwnoA))%cBzyLD6L0&Fxv&bvz|plUd7DL;(rWjxxb;EXr9(gc{v$3 zUxt|mosD*TcS|haNM7e$1uHcEDC zj7F*z-U0mJra4xTqSz>k7c-nb>m3@Ln2NP&+kB=-?&Rd{kpMp=}4OR z<^F!hrA!MxBzH#1n`(2R)r~nJ1ENsDt?iC`DM>)e)S!COfAwU9?;Q=YMRQ5Ke4Z#t zv4VFO1M_yf9iDq`faJ-se{RH5dQUB&NP@*kQ0H6m;i;msvC+X&+hu0lGh?rwkn|d% z>3PlIeZc((5(K3wgQV#*m8+;|#d*W4b0U-{63mKY_ieTE?n;EaSe+^j!#=#EDvVYpCnd+Dxt z6I&Ql(C2`jM6DlS7V{N|atjQOwT#ZPb3Qq%UIdc95X^QGPQ`J&Oz{K1{wdvw)IGZR zI5)LcG3;#XZ=Zlbmz4#CPt-g63q8+d%khy-LhOV*)}gqW>LMf7|N6 ddq(iD{?E*MXiP%-@15W;Hh*pRx6}ZD{{Xf`s$l>C literal 0 HcmV?d00001 diff --git a/tests/ast-parsing/compile/user_defined_value_type/using-for-0.8.8.sol-0.8.12-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/using-for-0.8.8.sol-0.8.12-compact.zip new file mode 100644 index 0000000000000000000000000000000000000000..573f4efc0c8f049284aecb80e7ad10cc286f81e3 GIT binary patch literal 3526 zcma)<_dgVlgM zo5K+@zJ0#Ge;$v|>-od;m)Ae=G%=(C-UUzst^?Zrp_b^OOdJOj0Kj4i00;vBfS>>b z@`(f-l z{JuS5VePz8^?b*9dqYFl`Utnq4Zb)Ya5zrqIrA&g+Z9s-%TvrI#B1M1{a9-zyaui> z4|Ka`#QLv@g$%>-ldU|dK%EwW`auBWPQW^q4U=K9j(gj!!vUw{^@|kFjOK#&Ghpz) zS=*t`y9q;Xc(s4y-Yqg>Sw4J~coVCUbvfcv#kf#P+1EbVMv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8.sol-0.8.14-compact.zip new file mode 100644 index 0000000000000000000000000000000000000000..db90bfcab2734551019cd1eab69f56c3a191db1c GIT binary patch literal 3521 zcma)8>LReOC-B_ZJ_OyR}207YglbZHs>D?BeeLb@f4c(p&)nECGNB06;!A)=BbQ(mVI- zaQ%JytS(QNJFR@!mj>JlHzs^q*v0oWu3__2txP7K0T{h^*j6(cJMx#6qNK3vyzjaq zHB_wxsT`N8TypcyC&gAAj|D6nFm(?+WSTy4W2w;JI?f(qA)wRKO_;L z_-o07vxnn-rCkPz1TTe=I90TyXNMC4@Y$|BhzsUlIFUX&9->*u=C*?Y=Xbpoy?8k@ z$j2Y|>ufUEA~w$&nn>bsc5JklpwzzJ{$vNt#nl?`*OQ0m@b*#h6hKxj3{!tB3Xdm; zm&|e}_#aOc;d811?`>NZpXz)Z=?RxT2*H%SY`8VuBrz+~oxNk+FB}wfh8`w%>)LwY(c0i-q7Xajbs^(&2E4qXimaObI{nS8zP z$mv3c#~{>4rj0$3QD-+qt@6$O)x2_BadJHEz?8i>=K?LC?%)*t?79xlJq-w!LaiJC z=g*p~;e5`5G6yx5xnMbwa9VV`C$G2T87y`8$;r^+@~jRiR`oPXvH#pJ)oQ%UUOuC3 z(?LLvzl=iJ%=w)R<9f58i;aLsYXU5)JNvh;lvdpdLYc{FGWg^)^pV}USNBnV=1>mH zA|wCuopP_{^ehhx+xM!=zkT?$B!9KclH1W}1XjH*7VHI(%scXrGzP5ZkTNi~2WF^0M8D zyHpE3^KjG0U^BuQZV6tqVF=NL->7)J)4wVsHbV!>DiluObo(lM$^W#Ij5lRRffifJ z(k4Gh!n}N-9|_o|(N3aHkGJ-UQsO)2Y7KL0{4V3<4WvVs;c>+S5)s{aNjOzNIrzGZ zw_$@!)3p1Kxt4yE>0OYBRl8;AO0y{=`-VV?UHeu8GfnLi8^t>X`hwf-1FYRNlf&|a zfWWc}s96{>h^k24hz%&#iyv>irPQ zJ3MyA1K$u9JFd-njlCOM`GI5uE*BQ)3JIJw+7H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Nuj%?%#b4q94Cqbk=teRp(d;#V@_!*l8oRMzoPRwSqkC8+r)v)PvSau8_rOVcO7ExB2u;LTfDGb z?DV+H!|mq%MKTYyv#*_ckC;RD4>tUI5=+)?VTf`uawjZJtn<$+)H{q|_*^cj0is!t zv*KfAA<1$KzV}?a+EI8rmI|>2*UJ^glE%t!v*kqR6eKx9roUfzhz7d37u~JE;PzGs z5SY+rhMu=mAU$V)Kvz&B(29dL*?Y6|vMYk1&e4HE# zC}>Ok!yQU$Og2cA#c62qQ>b42omU4`KgTMV)Y%_Cr7|v5yBY{^W>(H6trk3Y&n7bO zsi8|2PhCbU+%Pxm_>uU;I0072ab(2wBWi!Mp~!(ZBT!)*hL^o*FX#H{Ng5k_Yt~?4QBG6%Rqx_j{>N)9g}Y8nV1GC>w@f{) z@|}8`%$X$BMPA3Ppw9jk!VNVy6$QsXDYZIb&GD=+FUq#N5*H`?=8`dV+;J3r4i8Fw z+}Day8-g{=3yb>PtnbhBf`M-XVyAmzg`XfFulxm(C(%gXXxzt~D7QkOtQoAdw zgq(DqonHlQL86tc7Y}<_`)fX~XAXmi_B4}(@m^cY8%DNnX1=a{<68LEY)UJs$;<{K zb=YzhLos&oV83N6Y0D&GAmdkYp8r5vux}cda8!(EdD{T9$_py9T8N4XLOU}w*t`3C zMKiYT^>fY0)AQ7h$Jn5eXlfGIdmuBUgMhS#?OHy3W{|r@uVNSoG3!45Oo+Ah-n?tR z*^viE&-U(g4|JU~aObr0|KjyEf2><{9 literal 0 HcmV?d00001 diff --git a/tests/ast-parsing/compile/user_defined_value_type/using-for-0.8.8.sol-0.8.8-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/using-for-0.8.8.sol-0.8.8-compact.zip new file mode 100644 index 0000000000000000000000000000000000000000..89d650f85e835f65ed927413f91318fb0066435a GIT binary patch literal 3501 zcma)<=QkS+pvGf2MNpKsMr*~4pi-;EDzR!tTY{?ED`K@#YOmVWSBhE>0Id zQ+rqKUE6)%`~9ACpWlb)Jm)<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JD&VzI zl8Il^92qCzjw62q5KZ|EDI zJPB4mEN|LgfN4|t4jq5)E<8w-(SPBCMePt&l^=GF{G{QXl`vp;^_SG9NDkRID{Pv8 z8+A*Im=Gt@Z6^tNNkt`76l-QuhnTaBVU+KZryuHptZ|TcSgwhfs(5m757>p!g(fey z{4RZeScEl+bsH*F6w-h3R|ZWUkV8hNhw&qld5wJK;1A!yO_$jj0@S((^M@B_=3PGY zu1%yzX+QDc9tDNh9MeBTSa`3#=6T%5Z$c%=l!ntgkzUb!a(V=47?#fLb5J5IvL6PgJUl7IoWe=SX5JC7iHDt3m(OyZHQ-(0d#;o_?cIQm*EO2 z3D|)t$Ub+Wa(spxDX61kKn>U}ThmrDL z83-Ww=}OGp?1bu9NAS|1c`5DUlWiBb3HhnROi``ee*Zsy4*+5S1{u<`V;)+FrX*B?e`jM@2xqON& z`+2zJ=B|FDvm$9Y;VZ;dP*?I(WgYXNNTa80Sm7_W&s1ANcAxuv$KynN|Nj|`%QG&hYx&A!D*|+ zzq^We-IK%K%DTPwdNKXN#U0%s&FibaC@m&>W zt|Uv*gX3G2er$_q34E(T62~zKA&Ifv>!b=R=#t{bX`ZU-&g_*-G+A%&`>weQ4YynwUOU9ax&Ka$&fh%pD zf7tcMsIOB^%9moXhq=EF)Res+>}U1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n" + }, + "A": { + "b(MyType)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "B": { + "c(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/using-for-0.8.8.sol-0.8.11-compact.json b/tests/ast-parsing/expected/user_defined_value_type/using-for-0.8.8.sol-0.8.11-compact.json new file mode 100644 index 000000000..58fb20ce1 --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/using-for-0.8.8.sol-0.8.11-compact.json @@ -0,0 +1,11 @@ +{ + "MyLib": { + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n" + }, + "A": { + "b(MyType)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "B": { + "c(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/using-for-0.8.8.sol-0.8.12-compact.json b/tests/ast-parsing/expected/user_defined_value_type/using-for-0.8.8.sol-0.8.12-compact.json new file mode 100644 index 000000000..58fb20ce1 --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/using-for-0.8.8.sol-0.8.12-compact.json @@ -0,0 +1,11 @@ +{ + "MyLib": { + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n" + }, + "A": { + "b(MyType)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "B": { + "c(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/using-for-0.8.8.sol-0.8.13-compact.json b/tests/ast-parsing/expected/user_defined_value_type/using-for-0.8.8.sol-0.8.13-compact.json new file mode 100644 index 000000000..58fb20ce1 --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/using-for-0.8.8.sol-0.8.13-compact.json @@ -0,0 +1,11 @@ +{ + "MyLib": { + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n" + }, + "A": { + "b(MyType)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "B": { + "c(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/using-for-0.8.8.sol-0.8.14-compact.json b/tests/ast-parsing/expected/user_defined_value_type/using-for-0.8.8.sol-0.8.14-compact.json new file mode 100644 index 000000000..58fb20ce1 --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/using-for-0.8.8.sol-0.8.14-compact.json @@ -0,0 +1,11 @@ +{ + "MyLib": { + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n" + }, + "A": { + "b(MyType)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "B": { + "c(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/using-for-0.8.8.sol-0.8.15-compact.json b/tests/ast-parsing/expected/user_defined_value_type/using-for-0.8.8.sol-0.8.15-compact.json new file mode 100644 index 000000000..58fb20ce1 --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/using-for-0.8.8.sol-0.8.15-compact.json @@ -0,0 +1,11 @@ +{ + "MyLib": { + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n" + }, + "A": { + "b(MyType)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "B": { + "c(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/using-for-0.8.8.sol-0.8.8-compact.json b/tests/ast-parsing/expected/user_defined_value_type/using-for-0.8.8.sol-0.8.8-compact.json new file mode 100644 index 000000000..58fb20ce1 --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/using-for-0.8.8.sol-0.8.8-compact.json @@ -0,0 +1,11 @@ +{ + "MyLib": { + "a()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n" + }, + "A": { + "b(MyType)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "B": { + "c(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/user_defined_value_type/using-for-0.8.8.sol b/tests/ast-parsing/user_defined_value_type/using-for-0.8.8.sol new file mode 100644 index 000000000..bc65038ab --- /dev/null +++ b/tests/ast-parsing/user_defined_value_type/using-for-0.8.8.sol @@ -0,0 +1,22 @@ +type MyType is uint256; + +library MyLib { + using A for MyType; + using B for uint; + function a() internal returns(uint){ + MyType myvar = MyType.wrap(4); + return MyType.unwrap(myvar.b()).c(); + } +} + +library A { + function b(MyType e) public returns(MyType){ + return MyType.wrap(3); + } + +} +library B { + function c(uint e) public returns(uint){ + return 345; + } +} \ No newline at end of file diff --git a/tests/test_ast_parsing.py b/tests/test_ast_parsing.py index 2f0e9b12c..38c12e5d8 100644 --- a/tests/test_ast_parsing.py +++ b/tests/test_ast_parsing.py @@ -418,6 +418,7 @@ ALL_TESTS = [ Test("user_defined_value_type/constant-0.8.8.sol", ["0.8.8"] + make_version(8, 10, 15)), Test("user_defined_value_type/erc20-0.8.8.sol", ["0.8.8"] + make_version(8, 10, 15)), Test("user_defined_value_type/in_parenthesis-0.8.8.sol", ["0.8.8"] + make_version(8, 10, 15)), + Test("user_defined_value_type/using-for-0.8.8.sol", ["0.8.8"] + make_version(8, 10, 15)), Test("bytes_call.sol", ["0.8.12"]), Test("modifier_identifier_path.sol", VERSIONS_08), Test("free_functions/libraries_from_free.sol", ["0.8.12"]),