2022-10-05 19:05:43 -05:00
|
|
|
package tracetest
|
|
|
|
|
|
|
|
import (
|
|
|
|
"strings"
|
|
|
|
"unicode"
|
|
|
|
|
2022-10-11 02:37:00 -05:00
|
|
|
// Force-load native and js packages, to trigger registration
|
2022-10-05 19:05:43 -05:00
|
|
|
_ "github.com/ethereum/go-ethereum/eth/tracers/js"
|
|
|
|
_ "github.com/ethereum/go-ethereum/eth/tracers/native"
|
|
|
|
)
|
|
|
|
|
|
|
|
// camel converts a snake cased input string into a camel cased output.
|
|
|
|
func camel(str string) string {
|
|
|
|
pieces := strings.Split(str, "_")
|
|
|
|
for i := 1; i < len(pieces); i++ {
|
|
|
|
pieces[i] = string(unicode.ToUpper(rune(pieces[i][0]))) + pieces[i][1:]
|
|
|
|
}
|
|
|
|
return strings.Join(pieces, "")
|
|
|
|
}
|