bsc/tests/helper/common.go

12 lines
165 B
Go
Raw Normal View History

2014-10-15 01:41:00 +03:00
package helper
2015-03-16 12:27:38 +02:00
import "github.com/ethereum/go-ethereum/common"
2014-10-15 01:41:00 +03:00
func FromHex(h string) []byte {
2015-03-16 12:27:38 +02:00
if common.IsHex(h) {
2014-10-15 01:41:00 +03:00
h = h[2:]
}
2015-03-16 12:27:38 +02:00
return common.Hex2Bytes(h)
2014-10-15 01:41:00 +03:00
}