go-ethereum/ethutil/script_unix.go

20 lines
326 B
Go
Raw Normal View History

// +build !windows
2014-05-02 14:55:43 +03:00
package ethutil
2014-12-04 18:13:23 +02:00
import "github.com/ethereum/serpent-go"
2014-05-02 14:55:43 +03:00
// General compile function
func Compile(script string, silent bool) (ret []byte, err error) {
if len(script) > 2 {
2014-12-04 18:13:23 +02:00
byteCode, err := serpent.Compile(script)
if err != nil {
return nil, err
}
2014-12-04 18:13:23 +02:00
return byteCode, nil
2014-06-21 03:40:25 +03:00
}
return nil, nil
2014-05-02 14:55:43 +03:00
}