compiler|transaction: fix transaction.GetScript build, add to interop
There is no such syscall as Neo.Transaction.GetScript and GetScript should be available for contract's use.
This commit is contained in:
parent
559e8a16da
commit
1cbd75ab9e
2 changed files with 8 additions and 1 deletions
|
@ -72,7 +72,7 @@ var syscalls = map[string]map[string]string{
|
||||||
"GetOutputs": "Neo.Transaction.GetOutputs",
|
"GetOutputs": "Neo.Transaction.GetOutputs",
|
||||||
"GetReferences": "Neo.Transaction.GetReferences",
|
"GetReferences": "Neo.Transaction.GetReferences",
|
||||||
"GetUnspentCoins": "Neo.Transaction.GetUnspentCoins",
|
"GetUnspentCoins": "Neo.Transaction.GetUnspentCoins",
|
||||||
"GetScript": "Neo.Transaction.GetScript",
|
"GetScript": "Neo.InvocationTransaction.GetScript",
|
||||||
},
|
},
|
||||||
"asset": {
|
"asset": {
|
||||||
"Create": "Neo.Asset.Create",
|
"Create": "Neo.Asset.Create",
|
||||||
|
|
|
@ -48,3 +48,10 @@ func GetInputs(t Transaction) []input.Input {
|
||||||
func GetOutputs(t Transaction) []output.Output {
|
func GetOutputs(t Transaction) []output.Output {
|
||||||
return []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
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue