Пример #1
0
func CompileToValues(code []string) (script []*ethutil.Value) {
	script = make([]*ethutil.Value, len(code))
	for i, val := range code {
		instr, _ := ethutil.CompileInstr(val)

		script[i] = ethutil.NewValue(instr)
	}

	return
}
Пример #2
0
// Script compilation functions
// Compiles strings to machine code
func Compile(code []string) (script []string) {
	script = make([]string, len(code))
	for i, val := range code {
		instr, _ := ethutil.CompileInstr(val)

		script[i] = string(instr)
	}

	return
}