diff options
Diffstat (limited to 'mist/ui_lib.go')
-rw-r--r-- | mist/ui_lib.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mist/ui_lib.go b/mist/ui_lib.go index 1434e28d0..334442f9f 100644 --- a/mist/ui_lib.go +++ b/mist/ui_lib.go @@ -248,3 +248,12 @@ func (self *UiLib) Transact(object map[string]interface{}) (*ethpipe.JSReceipt, dataStr, ) } + +func (self *UiLib) Compile(code string) (string, error) { + bcode, err := ethutil.Compile(code, false) + if err != nil { + return err.Error(), err + } + + return ethutil.Bytes2Hex(bcode), err +} |