Commit c5c27eb
authored
fix invalid safeguard for solidity types (#122)
### TL;DR
Fixed Solidity type checking by using string prefix matching for integer types.
### What changed?
Replaced explicit mapping of integer types (uint8, int16, etc.) with a prefix check for "uint" and "int". Non-integer types like address, bool, and string remain in the map.
### How to test?
1. Test type checking with various integer types (uint8, int256, etc.)
2. Verify that non-integer types (address, bool, string) are still correctly identified
3. Ensure negative cases (non-types) return false
### Why make this change?
The previous implementation listed every possible integer type explicitly, which was verbose and harder to maintain. Uints and ints can be in 8 byte increments.1 file changed
+3
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
146 | 149 | | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | 150 | | |
162 | 151 | | |
163 | 152 | | |
| |||
0 commit comments