script_unix.go 326 Bytes
Newer Older
1 2
// +build !windows

obscuren's avatar
obscuren committed
3 4
package ethutil

obscuren's avatar
obscuren committed
5
import "github.com/ethereum/serpent-go"
obscuren's avatar
obscuren committed
6 7

// General compile function
8
func Compile(script string, silent bool) (ret []byte, err error) {
9
	if len(script) > 2 {
obscuren's avatar
obscuren committed
10 11 12
		byteCode, err := serpent.Compile(script)
		if err != nil {
			return nil, err
13
		}
obscuren's avatar
obscuren committed
14 15

		return byteCode, nil
obscuren's avatar
obscuren committed
16
	}
17 18

	return nil, nil
obscuren's avatar
obscuren committed
19
}