@@ -2,7 +2,6 @@ package valuegeneration
22
33import (
44 "encoding/hex"
5- "github.com/crytic/medusa/chain/types"
65 "hash"
76 "math/big"
87
@@ -174,44 +173,24 @@ func (vs *ValueSet) RemoveBytes(b []byte) {
174173 delete (vs .bytes , hashStr )
175174}
176175
177- func (vs * ValueSet ) Add (results * types.MessageResults ) {
178- valueGenerationTracerResults := results .AdditionalResults ["ValueGenerationTracerResults" ]
179-
180- if transactionOutputValues , ok := valueGenerationTracerResults .([]any ); ok {
181-
182- for _ , eventOrReturnValues := range transactionOutputValues {
183- //if eventOrReturnSlice, ok := eventOrReturnValues.(TransactionOutputValues); ok {
184- // for _, eventOrReturnValue := range eventOrReturnSlice {
185- // switch v := eventOrReturnValue.(type) {
186- // case *big.Int:
187- // valueSet.AddInteger(v)
188- // case common.Address:
189- // valueSet.AddAddress(v)
190- // case string:
191- // valueSet.AddString(v)
192- // case []byte:
193- // valueSet.AddBytes(v)
194- // default:
195- // continue
196- // }
197- //
198- // }
199- if eventOrReturnSlice , ok := eventOrReturnValues .([]any ); ok {
200- for _ , eventOrReturnValue := range eventOrReturnSlice {
201- switch v := eventOrReturnValue .(type ) {
202- case * big.Int :
203- vs .AddInteger (v )
204- case common.Address :
205- vs .AddAddress (v )
206- case string :
207- vs .AddString (v )
208- case []byte :
209- vs .AddBytes (v )
210- default :
211- continue
212- }
213-
176+ func (vs * ValueSet ) Add (results []any ) {
177+
178+ for _ , eventOrReturnValues := range results {
179+ if eventOrReturnSlice , ok := eventOrReturnValues .([]any ); ok {
180+ for _ , eventOrReturnValue := range eventOrReturnSlice {
181+ switch v := eventOrReturnValue .(type ) {
182+ case * big.Int :
183+ vs .AddInteger (v )
184+ case common.Address :
185+ vs .AddAddress (v )
186+ case string :
187+ vs .AddString (v )
188+ case []byte :
189+ vs .AddBytes (v )
190+ default :
191+ continue
214192 }
193+
215194 }
216195 }
217196 }
0 commit comments