コード例 #1
0
ファイル: state.go プロジェクト: josephyzhou/eth-go
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
ファイル: state.go プロジェクト: josephyzhou/eth-go
// 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
}