diff --git a/pkg/compiler/analysis.go b/pkg/compiler/analysis.go index 955ded585..41526aba0 100644 --- a/pkg/compiler/analysis.go +++ b/pkg/compiler/analysis.go @@ -16,7 +16,7 @@ var ( goBuiltins = []string{"len", "append", "panic"} // Custom builtin utility functions. customBuiltins = []string{ - "SHA256", "AppCall", + "AppCall", "FromAddress", "Equals", "ToBool", "ToByteArray", "ToInteger", } diff --git a/pkg/compiler/codegen.go b/pkg/compiler/codegen.go index c63499bd1..eed015ce1 100644 --- a/pkg/compiler/codegen.go +++ b/pkg/compiler/codegen.go @@ -1220,8 +1220,6 @@ func (c *codegen) convertBuiltin(expr *ast.CallExpr) { typ = stackitem.BooleanT } c.emitConvert(typ) - case "SHA256": - emit.Syscall(c.prog.BinWriter, "Neo.Crypto.SHA256") case "AppCall": c.emitReverse(len(expr.Args)) buf := c.getByteArray(expr.Args[0]) diff --git a/pkg/compiler/syscall.go b/pkg/compiler/syscall.go index 026cb1b8b..6b482ef80 100644 --- a/pkg/compiler/syscall.go +++ b/pkg/compiler/syscall.go @@ -36,6 +36,7 @@ var syscalls = map[string]map[string]Syscall{ "ECDsaSecp256r1Verify": {"Neo.Crypto.VerifyWithECDsaSecp256r1", false}, "ECDSASecp256r1CheckMultisig": {"Neo.Crypto.CheckMultisigWithECDsaSecp256r1", false}, "RIPEMD160": {"Neo.Crypto.RIPEMD160", false}, + "SHA256": {"Neo.Crypto.SHA256", false}, }, "enumerator": { "Concat": {"System.Enumerator.Concat", false},