2018-08-20 07:07:08 +00:00
|
|
|
package compiler
|
|
|
|
|
2020-08-14 10:50:52 +00:00
|
|
|
import "github.com/nspcc-dev/neo-go/pkg/core/interop/interopnames"
|
|
|
|
|
2020-07-16 09:39:54 +00:00
|
|
|
// All lists are sorted, keep 'em this way, please.
|
2020-09-08 10:41:47 +00:00
|
|
|
var syscalls = map[string]map[string]string{
|
2020-07-07 18:57:51 +00:00
|
|
|
"binary": {
|
2020-11-10 09:39:52 +00:00
|
|
|
"Atoi": interopnames.SystemBinaryAtoi,
|
2020-09-08 10:41:47 +00:00
|
|
|
"Base58Decode": interopnames.SystemBinaryBase58Decode,
|
|
|
|
"Base58Encode": interopnames.SystemBinaryBase58Encode,
|
|
|
|
"Base64Decode": interopnames.SystemBinaryBase64Decode,
|
|
|
|
"Base64Encode": interopnames.SystemBinaryBase64Encode,
|
|
|
|
"Deserialize": interopnames.SystemBinaryDeserialize,
|
2020-11-10 09:39:52 +00:00
|
|
|
"Itoa": interopnames.SystemBinaryItoa,
|
2020-09-08 10:41:47 +00:00
|
|
|
"Serialize": interopnames.SystemBinarySerialize,
|
2020-07-16 09:39:54 +00:00
|
|
|
},
|
|
|
|
"blockchain": {
|
2020-09-08 10:41:47 +00:00
|
|
|
"GetBlock": interopnames.SystemBlockchainGetBlock,
|
|
|
|
"GetContract": interopnames.SystemBlockchainGetContract,
|
|
|
|
"GetHeight": interopnames.SystemBlockchainGetHeight,
|
|
|
|
"GetTransaction": interopnames.SystemBlockchainGetTransaction,
|
|
|
|
"GetTransactionFromBlock": interopnames.SystemBlockchainGetTransactionFromBlock,
|
|
|
|
"GetTransactionHeight": interopnames.SystemBlockchainGetTransactionHeight,
|
2020-07-16 09:39:54 +00:00
|
|
|
},
|
|
|
|
"contract": {
|
2020-12-08 11:11:06 +00:00
|
|
|
"Call": interopnames.SystemContractCall,
|
2020-12-08 12:37:03 +00:00
|
|
|
"CallEx": interopnames.SystemContractCallEx,
|
2020-09-08 10:41:47 +00:00
|
|
|
"Create": interopnames.SystemContractCreate,
|
|
|
|
"CreateStandardAccount": interopnames.SystemContractCreateStandardAccount,
|
|
|
|
"Destroy": interopnames.SystemContractDestroy,
|
|
|
|
"IsStandard": interopnames.SystemContractIsStandard,
|
|
|
|
"GetCallFlags": interopnames.SystemContractGetCallFlags,
|
|
|
|
"Update": interopnames.SystemContractUpdate,
|
2020-07-07 18:57:51 +00:00
|
|
|
},
|
2020-03-23 09:44:23 +00:00
|
|
|
"crypto": {
|
2020-09-08 10:41:47 +00:00
|
|
|
"ECDsaSecp256k1Verify": interopnames.NeoCryptoVerifyWithECDsaSecp256k1,
|
|
|
|
"ECDSASecp256k1CheckMultisig": interopnames.NeoCryptoCheckMultisigWithECDsaSecp256k1,
|
|
|
|
"ECDsaSecp256r1Verify": interopnames.NeoCryptoVerifyWithECDsaSecp256r1,
|
|
|
|
"ECDSASecp256r1CheckMultisig": interopnames.NeoCryptoCheckMultisigWithECDsaSecp256r1,
|
|
|
|
"RIPEMD160": interopnames.NeoCryptoRIPEMD160,
|
|
|
|
"SHA256": interopnames.NeoCryptoSHA256,
|
2020-03-23 09:44:23 +00:00
|
|
|
},
|
2020-05-18 10:20:49 +00:00
|
|
|
"enumerator": {
|
2020-09-08 10:41:47 +00:00
|
|
|
"Concat": interopnames.SystemEnumeratorConcat,
|
|
|
|
"Create": interopnames.SystemEnumeratorCreate,
|
|
|
|
"Next": interopnames.SystemEnumeratorNext,
|
|
|
|
"Value": interopnames.SystemEnumeratorValue,
|
2020-05-18 10:20:49 +00:00
|
|
|
},
|
2020-07-16 09:39:54 +00:00
|
|
|
"iterator": {
|
2020-09-08 10:41:47 +00:00
|
|
|
"Concat": interopnames.SystemIteratorConcat,
|
|
|
|
"Create": interopnames.SystemIteratorCreate,
|
|
|
|
"Key": interopnames.SystemIteratorKey,
|
|
|
|
"Keys": interopnames.SystemIteratorKeys,
|
|
|
|
"Next": interopnames.SystemEnumeratorNext,
|
|
|
|
"Value": interopnames.SystemEnumeratorValue,
|
|
|
|
"Values": interopnames.SystemIteratorValues,
|
2020-06-15 08:08:23 +00:00
|
|
|
},
|
2020-07-16 09:39:54 +00:00
|
|
|
"json": {
|
2020-09-08 10:41:47 +00:00
|
|
|
"Deserialize": interopnames.SystemJSONDeserialize,
|
|
|
|
"Serialize": interopnames.SystemJSONSerialize,
|
2018-08-22 07:51:35 +00:00
|
|
|
},
|
|
|
|
"runtime": {
|
2020-09-08 10:41:47 +00:00
|
|
|
"GasLeft": interopnames.SystemRuntimeGasLeft,
|
|
|
|
"GetInvocationCounter": interopnames.SystemRuntimeGetInvocationCounter,
|
|
|
|
"GetCallingScriptHash": interopnames.SystemRuntimeGetCallingScriptHash,
|
|
|
|
"GetEntryScriptHash": interopnames.SystemRuntimeGetEntryScriptHash,
|
|
|
|
"GetExecutingScriptHash": interopnames.SystemRuntimeGetExecutingScriptHash,
|
|
|
|
"GetNotifications": interopnames.SystemRuntimeGetNotifications,
|
|
|
|
"GetScriptContainer": interopnames.SystemRuntimeGetScriptContainer,
|
|
|
|
"GetTime": interopnames.SystemRuntimeGetTime,
|
|
|
|
"GetTrigger": interopnames.SystemRuntimeGetTrigger,
|
|
|
|
"CheckWitness": interopnames.SystemRuntimeCheckWitness,
|
|
|
|
"Log": interopnames.SystemRuntimeLog,
|
|
|
|
"Notify": interopnames.SystemRuntimeNotify,
|
|
|
|
"Platform": interopnames.SystemRuntimePlatform,
|
2018-08-22 07:51:35 +00:00
|
|
|
},
|
2020-07-16 09:39:54 +00:00
|
|
|
"storage": {
|
2020-09-08 10:41:47 +00:00
|
|
|
"ConvertContextToReadOnly": interopnames.SystemStorageAsReadOnly,
|
|
|
|
"Delete": interopnames.SystemStorageDelete,
|
|
|
|
"Find": interopnames.SystemStorageFind,
|
|
|
|
"Get": interopnames.SystemStorageGet,
|
|
|
|
"GetContext": interopnames.SystemStorageGetContext,
|
|
|
|
"GetReadOnlyContext": interopnames.SystemStorageGetReadOnlyContext,
|
|
|
|
"Put": interopnames.SystemStoragePut,
|
|
|
|
"PutEx": interopnames.SystemStoragePutEx,
|
2018-08-31 08:23:57 +00:00
|
|
|
},
|
2018-08-20 07:07:08 +00:00
|
|
|
}
|