-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem: no log converted from native event #1159
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1159 +/- ##
===========================================
- Coverage 46.20% 33.57% -12.63%
===========================================
Files 108 113 +5
Lines 7975 11064 +3089
===========================================
+ Hits 3685 3715 +30
- Misses 3923 6980 +3057
- Partials 367 369 +2
|
a321742
to
1c0d0b1
Compare
de88542
to
12a97a2
Compare
case strings.HasPrefix(addrString, cfg.GetBech32ValidatorAddrPrefix()): | ||
addr, _ = sdk.ValAddressFromBech32(addrString) | ||
case strings.HasPrefix(addrString, cfg.GetBech32AccountAddrPrefix()): | ||
addr, _ = sdk.AccAddressFromBech32(addrString) |
Check warning
Code scanning / gosec
Returned error is not propagated up the stack. Warning
case common.IsHexAddress(addrString): | ||
addr = common.HexToAddress(addrString).Bytes() | ||
case strings.HasPrefix(addrString, cfg.GetBech32ValidatorAddrPrefix()): | ||
addr, _ = sdk.ValAddressFromBech32(addrString) |
Check warning
Code scanning / gosec
Returned error is not propagated up the stack. Warning
for _, event := range a.Events { | ||
event_type := toUnderScore(event.Name) | ||
descriptors[event_type] = &EventDescriptor{ | ||
id: event.ID, | ||
indexed: getArguments(event.Inputs, true), | ||
nonIndexed: getArguments(event.Inputs, false), | ||
packValues: event.Inputs.NonIndexed().PackValues, | ||
} | ||
} |
Check failure
Code scanning / gosec
the value in the range statement should be _ unless copying a map: want: for key := range m Error
for _, event := range a.Events { | ||
event_type := toUnderScore(event.Name) | ||
descriptors[event_type] = &EventDescriptor{ | ||
id: event.ID, | ||
indexed: getArguments(event.Inputs, true), | ||
nonIndexed: getArguments(event.Inputs, false), | ||
packValues: event.Inputs.NonIndexed().PackValues, | ||
} | ||
} |
Check warning
Code scanning / CodeQL
Iteration over map Warning
Signed-off-by: yihuang <[email protected]>
@@ -180,7 +180,7 @@ | |||
return nil, err | |||
} | |||
|
|||
logs, err := backend.TxLogsFromEvents(txResult.Events, parsedTx.MsgIndex) | |||
logs, err := evmtypes.DecodeMsgLogsFromEvents(txResult.Data, parsedTx.MsgIndex, uint64(blockRes.Height)) |
Check failure
Code scanning / gosec
Potential integer overflow by integer type conversion Error
4f11310
👮🏻👮🏻👮🏻 !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! 👮🏻👮🏻👮🏻
PR Checklist:
make
)make test
)go fmt
)golangci-lint run
)go list -json -m all | nancy sleuth
)Thank you for your code, it's appreciated! :)