diff --git a/pkg/compiler/syscall.go b/pkg/compiler/syscall.go index 26307270d..086112040 100644 --- a/pkg/compiler/syscall.go +++ b/pkg/compiler/syscall.go @@ -62,14 +62,15 @@ var syscalls = map[string]map[string]string{ "GetTransaction": "Neo.Block.GetTransaction", }, "transaction": { - "GetAttributes": "Neo.Transaction.GetAttributes", - "GetHash": "Neo.Transaction.GetHash", - "GetInputs": "Neo.Transaction.GetInputs", - "GetOutputs": "Neo.Transaction.GetOutputs", - "GetReferences": "Neo.Transaction.GetReferences", - "GetScript": "Neo.InvocationTransaction.GetScript", - "GetType": "Neo.Transaction.GetType", - "GetWitnesses": "Neo.Transaction.GetWitnesses", + "GetAttributes": "Neo.Transaction.GetAttributes", + "GetHash": "Neo.Transaction.GetHash", + "GetInputs": "Neo.Transaction.GetInputs", + "GetOutputs": "Neo.Transaction.GetOutputs", + "GetReferences": "Neo.Transaction.GetReferences", + "GetScript": "Neo.InvocationTransaction.GetScript", + "GetType": "Neo.Transaction.GetType", + "GetUnspentCoins": "Neo.Transaction.GetUnspentCoins", + "GetWitnesses": "Neo.Transaction.GetWitnesses", }, "asset": { "Create": "Neo.Asset.Create", diff --git a/pkg/interop/transaction/transaction.go b/pkg/interop/transaction/transaction.go index 00d06c25e..e354d7baf 100644 --- a/pkg/interop/transaction/transaction.go +++ b/pkg/interop/transaction/transaction.go @@ -53,6 +53,12 @@ func GetReferences(t Transaction) []interface{} { return []interface{}{} } +// GetUnspentCoins returns a slice of not yet spent ouputs of a given transaction. +// This function uses `Neo.Transaction.GetUnspentCoint` syscall. +func GetUnspentCoins(t Transaction) []output.Output { + return []output.Output{} +} + // GetInputs returns a slice of inputs of a given Transaction. Refer to input // package on how to use them. This function uses `Neo.Transaction.GetInputs` // syscall.