diff --git a/pkg/compiler/syscall.go b/pkg/compiler/syscall.go index a470f34fb..2459a49e6 100644 --- a/pkg/compiler/syscall.go +++ b/pkg/compiler/syscall.go @@ -69,7 +69,7 @@ var syscalls = map[string]map[string]string{ "GetOutputs": "Neo.Transaction.GetOutputs", "GetReferences": "Neo.Transaction.GetReferences", "GetUnspentCoins": "Neo.Transaction.GetUnspentCoins", - "GetScript": "Neo.Transaction.GetScript", + "GetScript": "Neo.InvocationTransaction.GetScript", }, "asset": { "Create": "Neo.Asset.Create", diff --git a/pkg/interop/transaction/transaction.go b/pkg/interop/transaction/transaction.go index 1d863f5c3..354fcf019 100644 --- a/pkg/interop/transaction/transaction.go +++ b/pkg/interop/transaction/transaction.go @@ -48,3 +48,10 @@ func GetInputs(t Transaction) []input.Input { func GetOutputs(t Transaction) []output.Output { return []output.Output{} } + +// GetScript returns the script stored in a given Invocation transaction. +// Calling it for any other Transaction type would lead to failure. It uses +// `Neo.InvocationTransaction.GetScript` syscall. +func GetScript(t Transaction) []byte { + return nil +}