Add event and error identifiers to cli hashes cmd

This commit is contained in:
joshieDo
2022-02-08 17:44:21 +01:00
committed by Marenz
parent 5c3bcb6c2d
commit 9e62f21b25
7 changed files with 109 additions and 2 deletions
+1
View File
@@ -0,0 +1 @@
--hashes
+28
View File
@@ -0,0 +1,28 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.0;
error fileLevelError(uint z);
library L {
event libraryEvent(uint r);
error libraryError(uint r);
error libraryErrorUnused(uint u);
event libraryEventUnused(uint u);
}
contract C {
struct S { uint x; }
event ev(uint y);
event anon_ev(uint y) anonymous;
error err(uint z, uint w);
function f(S memory s) public {
emit L.libraryEvent(3);
if (s.x > 1)
revert fileLevelError(3);
else
revert L.libraryError(4);
}
}
+23
View File
@@ -0,0 +1,23 @@
======= hashes/input.sol:C =======
Function signatures:
3fc03eeb: f((uint256))
Error signatures:
619a0bb7: err(uint256,uint256)
82b5f64f: fileLevelError(uint256)
8c41f45c: libraryError(uint256)
Event signatures:
2d4dd5fe18ada5a020a9f5591539a8dc3010a5c074ba6a70e1c956659f02786a: ev(uint256)
======= hashes/input.sol:L =======
Function signatures:
Error signatures:
8c41f45c: libraryError(uint256)
c61c03f5: libraryErrorUnused(uint256)
Event signatures:
81f3fb02f88d32d3bb08c80c9a622ca3b3223292f131c6ad049811f9a8a606dc: libraryEvent(uint256)
0a994ad3600197f16ffe1ea1101caea3174efe5ebd9ba9a75d6d5524c5de28cd: libraryEventUnused(uint256)