2018-08-20 07:07:08 +00:00
|
|
|
package compiler
|
|
|
|
|
2020-07-16 09:39:54 +00:00
|
|
|
// Syscall represents NEO or System syscall API with flag for proper AVM generation
|
|
|
|
type Syscall struct {
|
|
|
|
API string
|
|
|
|
ConvertResultToStruct bool
|
|
|
|
}
|
|
|
|
|
|
|
|
// All lists are sorted, keep 'em this way, please.
|
|
|
|
var syscalls = map[string]map[string]Syscall{
|
2020-07-07 18:57:51 +00:00
|
|
|
"binary": {
|
2020-07-16 09:39:54 +00:00
|
|
|
"Deserialize": {"System.Binary.Deserialize", false},
|
|
|
|
"Serialize": {"System.Binary.Serialize", false},
|
|
|
|
},
|
|
|
|
"blockchain": {
|
|
|
|
"GetBlock": {"System.Blockchain.GetBlock", true},
|
|
|
|
"GetContract": {"System.Blockchain.GetContract", false},
|
|
|
|
"GetHeight": {"System.Blockchain.GetHeight", false},
|
|
|
|
"GetTransaction": {"System.Blockchain.GetTransaction", true},
|
|
|
|
"GetTransactionFromBlock": {"System.Blockchain.GetTransactionFromBlock", false},
|
|
|
|
"GetTransactionHeight": {"System.Blockchain.GetTransactionHeight", false},
|
|
|
|
},
|
|
|
|
"contract": {
|
|
|
|
"Create": {"System.Contract.Create", false},
|
|
|
|
"CreateStandardAccount": {"System.Contract.CreateStandardAccount", false},
|
|
|
|
"Destroy": {"System.Contract.Destroy", false},
|
|
|
|
"IsStandard": {"System.Contract.IsStandard", false},
|
|
|
|
"Update": {"System.Contract.Update", false},
|
2020-07-07 18:57:51 +00:00
|
|
|
},
|
2020-03-23 09:44:23 +00:00
|
|
|
"crypto": {
|
2020-07-16 09:39:54 +00:00
|
|
|
"ECDsaSecp256k1Verify": {"Neo.Crypto.VerifyWithECDsaSecp256k1", false},
|
|
|
|
"ECDSASecp256k1CheckMultisig": {"Neo.Crypto.CheckMultisigWithECDsaSecp256k1", false},
|
|
|
|
"ECDsaSecp256r1Verify": {"Neo.Crypto.VerifyWithECDsaSecp256r1", false},
|
|
|
|
"ECDSASecp256r1CheckMultisig": {"Neo.Crypto.CheckMultisigWithECDsaSecp256r1", false},
|
2020-03-23 09:44:23 +00:00
|
|
|
},
|
2020-05-18 10:20:49 +00:00
|
|
|
"enumerator": {
|
2020-07-16 09:39:54 +00:00
|
|
|
"Concat": {"System.Enumerator.Concat", false},
|
|
|
|
"Create": {"System.Enumerator.Create", false},
|
|
|
|
"Next": {"System.Enumerator.Next", false},
|
|
|
|
"Value": {"System.Enumerator.Value", false},
|
2020-05-18 10:20:49 +00:00
|
|
|
},
|
2020-07-16 09:39:54 +00:00
|
|
|
"iterator": {
|
|
|
|
"Concat": {"System.Iterator.Concat", false},
|
|
|
|
"Create": {"System.Iterator.Create", false},
|
|
|
|
"Key": {"System.Iterator.Key", false},
|
|
|
|
"Keys": {"System.Iterator.Keys", false},
|
|
|
|
"Next": {"System.Enumerator.Next", false},
|
|
|
|
"Value": {"System.Enumerator.Value", false},
|
|
|
|
"Values": {"System.Iterator.Values", false},
|
2020-06-15 08:08:23 +00:00
|
|
|
},
|
2020-07-16 09:39:54 +00:00
|
|
|
"json": {
|
|
|
|
"Deserialize": {"System.Json.Deserialize", false},
|
|
|
|
"Serialize": {"System.Json.Serialize", false},
|
2018-08-22 07:51:35 +00:00
|
|
|
},
|
|
|
|
"runtime": {
|
2020-07-16 09:39:54 +00:00
|
|
|
"GasLeft": {"System.Runtime.GasLeft", false},
|
|
|
|
"GetInvocationCounter": {"System.Runtime.GetInvocationCounter", false},
|
|
|
|
"GetCallingScriptHash": {"System.Runtime.GetCallingScriptHash", false},
|
|
|
|
"GetEntryScriptHash": {"System.Runtime.GetEntryScriptHash", false},
|
|
|
|
"GetExecutingScriptHash": {"System.Runtime.GetExecutingScriptHash", false},
|
|
|
|
"GetNotifications": {"System.Runtime.GetNotifications", false},
|
|
|
|
"GetScriptContainer": {"System.Runtime.GetScriptContainer", true},
|
|
|
|
"GetTime": {"System.Runtime.GetTime", false},
|
|
|
|
"GetTrigger": {"System.Runtime.GetTrigger", false},
|
|
|
|
"CheckWitness": {"System.Runtime.CheckWitness", false},
|
|
|
|
"Log": {"System.Runtime.Log", false},
|
|
|
|
"Notify": {"System.Runtime.Notify", false},
|
2018-08-22 07:51:35 +00:00
|
|
|
},
|
2020-07-16 09:39:54 +00:00
|
|
|
"storage": {
|
|
|
|
"ConvertContextToReadOnly": {"System.Storage.AsReadOnly", false},
|
|
|
|
"Delete": {"System.Storage.Delete", false},
|
|
|
|
"Find": {"System.Storage.Find", false},
|
|
|
|
"Get": {"System.Storage.Get", false},
|
|
|
|
"GetContext": {"System.Storage.GetContext", false},
|
|
|
|
"GetReadOnlyContext": {"System.Storage.GetReadOnlyContext", false},
|
|
|
|
"Put": {"System.Storage.Put", false},
|
2018-08-31 08:23:57 +00:00
|
|
|
},
|
2018-08-20 07:07:08 +00:00
|
|
|
}
|