From 3db9c8007086e0735695a6477c21056737519db9 Mon Sep 17 00:00:00 2001 From: obscuren Date: Thu, 4 Dec 2014 17:13:23 +0100 Subject: Removed mutan. Closes #183 --- ethutil/script_unix.go | 42 ++++++------------------------------------ ethutil/script_windows.go | 23 +---------------------- 2 files changed, 7 insertions(+), 58 deletions(-) (limited to 'ethutil') diff --git a/ethutil/script_unix.go b/ethutil/script_unix.go index 6827d4e2f..9250dda57 100644 --- a/ethutil/script_unix.go +++ b/ethutil/script_unix.go @@ -2,47 +2,17 @@ package ethutil -import ( - "fmt" - "strings" - - "github.com/ethereum/serpent-go" - "github.com/obscuren/mutan" - "github.com/obscuren/mutan/backends" -) +import "github.com/ethereum/serpent-go" // General compile function func Compile(script string, silent bool) (ret []byte, err error) { if len(script) > 2 { - line := strings.Split(script, "\n")[0] - - if len(line) > 1 && line[0:2] == "#!" { - switch line { - case "#!serpent": - byteCode, err := serpent.Compile(script) - if err != nil { - return nil, err - } - - return byteCode, nil - } - } else { - - compiler := mutan.NewCompiler(backend.NewEthereumBackend()) - compiler.Silent = silent - byteCode, errors := compiler.Compile(strings.NewReader(script)) - if len(errors) > 0 { - var errs string - for _, er := range errors { - if er != nil { - errs += er.Error() - } - } - return nil, fmt.Errorf("%v", errs) - } - - return byteCode, nil + byteCode, err := serpent.Compile(script) + if err != nil { + return nil, err } + + return byteCode, nil } return nil, nil diff --git a/ethutil/script_windows.go b/ethutil/script_windows.go index ef239cd51..1dedc5f60 100644 --- a/ethutil/script_windows.go +++ b/ethutil/script_windows.go @@ -2,31 +2,10 @@ package ethutil -import ( - "fmt" - "strings" - - "github.com/obscuren/mutan" - "github.com/obscuren/mutan/backends" -) - // General compile function func Compile(script string, silent bool) (ret []byte, err error) { if len(script) > 2 { - compiler := mutan.NewCompiler(backend.NewEthereumBackend()) - compiler.Silent = silent - byteCode, errors := compiler.Compile(strings.NewReader(script)) - if len(errors) > 0 { - var errs string - for _, er := range errors { - if er != nil { - errs += er.Error() - } - } - return nil, fmt.Errorf("%v", errs) - } - - return byteCode, nil + return nil, nil } return nil, nil -- cgit