Skip to content

Commit 714d227

Browse files
Update x/evm/precompile/funtoken.go
For consistency with other call sites of `evm.ParseOOGPanic` in this pull request (e.g., in `wasm.go`, `oracle.go`), it's better to use `any` instead of `interface{}` for the panic handler's argument type. While `interface{}` is an alias for `any` in modern Go, using `any` consistently improves code readability and aligns with modern Go practices. Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 4c46606 commit 714d227

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

x/evm/precompile/funtoken.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ func (p precompileFunToken) DynamicRun(
9696
)
9797
panicInfo := recover()
9898
if panicInfo != nil {
99-
oog, perr = evm.ParseOOGPanic(panicInfo, func(p interface{}) string {
100-
return fmt.Sprintf("unexpected panic in precompile: %v", p)
101-
})
99+
oog, perr = evm.ParseOOGPanic(panicInfo, func(p any) string {
100+
return fmt.Sprintf("unexpected panic in precompile: %v", p)
101+
})
102102
}
103103
if oog {
104104
gasCost = startResult.Ctx.GasMeter().GasConsumed()

0 commit comments

Comments
 (0)