unpackdev / solgo

Solidity parser in Go, designed to transform Solidity code into a structured format for enhanced analysis, particularly beneficial for developers using Go to analyze Solidity smart contracts.
https://unpack.dev
Apache License 2.0
1 stars 0 forks source link

AST Bugfix: correctly parsing TypeNameContext - slice of types #183

Closed 0x19 closed 5 months ago

0x19 commented 5 months ago

Well this one was nasty. Basically what I did is went through parser.TypeNameContext and created 3 different nodes instead of one, resulting in types such as address[] being address only. This had issues later on with ABI and constructor and what not. Fixed it now.

Fixing this error cascading resulted in different error while doing the resolution of the reference ids. -> I had id incremented where it should not be resulting in a reference not being able to find itself.

Besides that, now due to the [] types, storage is a bit more buggy. Applied patch for tests to pass but storage itself needs fix.