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