neo_devpack_solidity/runtime/spec/
syscalls.rs1use super::*;
2
3pub static SYSCALLS: Lazy<HashMap<[u8; 4], SyscallSpec>> = Lazy::new(|| {
7 let names = [
8 "System.Storage.GetContext",
10 "System.Storage.GetReadOnlyContext",
11 "System.Storage.AsReadOnly",
12 "System.Storage.Get",
13 "System.Storage.Put",
14 "System.Storage.Delete",
15 "System.Storage.Find",
16 "System.Iterator.Next",
18 "System.Iterator.Value",
19 "System.Crypto.CheckSig",
21 "System.Crypto.CheckMultisig",
22 "System.Contract.Call",
24 "System.Contract.GetCallFlags",
25 "System.Contract.CreateStandardAccount",
26 "System.Contract.CreateMultisigAccount",
27 "System.Runtime.GetTrigger",
29 "System.Runtime.Platform",
30 "System.Runtime.GetNetwork",
31 "System.Runtime.GetAddressVersion",
32 "System.Runtime.GetTime",
33 "System.Runtime.GetScriptContainer",
34 "System.Runtime.GetExecutingScriptHash",
35 "System.Runtime.GetCallingScriptHash",
36 "System.Runtime.GetEntryScriptHash",
37 "System.Runtime.LoadScript",
38 "System.Runtime.CheckWitness",
39 "System.Runtime.GetInvocationCounter",
40 "System.Runtime.GetRandom",
41 "System.Runtime.Log",
42 "System.Runtime.Notify",
43 "System.Runtime.GetNotifications",
44 "System.Runtime.GasLeft",
45 "System.Runtime.BurnGas",
46 "System.Runtime.CurrentSigners",
47 "System.Runtime.GetMsgValue",
52 ];
53
54 let mut m = HashMap::new();
55 for name in names {
56 m.insert(
57 interop_id_bytes(name),
58 SyscallSpec {
59 id: interop_id_bytes(name),
60 name,
61 },
62 );
63 }
64 m
65});
66
67pub fn syscall_name(id: &[u8; 4]) -> Option<&'static str> {
68 SYSCALLS.get(id).map(|s| s.name)
69}