mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-25 21:17:16 +00:00
Using mutan assembler stage
This commit is contained in:
parent
0e8ca84b67
commit
883810b533
@ -9,7 +9,7 @@ import (
|
|||||||
|
|
||||||
// General compile function
|
// General compile function
|
||||||
func Compile(script string) ([]byte, error) {
|
func Compile(script string) ([]byte, error) {
|
||||||
asm, errors := mutan.Compile(strings.NewReader(script), false)
|
byteCode, errors := mutan.Compile(strings.NewReader(script), false)
|
||||||
if len(errors) > 0 {
|
if len(errors) > 0 {
|
||||||
var errs string
|
var errs string
|
||||||
for _, er := range errors {
|
for _, er := range errors {
|
||||||
@ -20,7 +20,7 @@ func Compile(script string) ([]byte, error) {
|
|||||||
return nil, fmt.Errorf("%v", errs)
|
return nil, fmt.Errorf("%v", errs)
|
||||||
}
|
}
|
||||||
|
|
||||||
return ethutil.Assemble(asm...), nil
|
return byteCode, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func CompileScript(script string) ([]byte, []byte, error) {
|
func CompileScript(script string) ([]byte, []byte, error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user