use super::*;
pub fn syscall_gas_table() -> std::collections::HashMap<[u8; 4], u64> {
use std::collections::HashMap;
let mut m = HashMap::new();
for (_, spec) in SYSCALLS.iter() {
let gas = match spec.name {
"System.Storage.GetContext"
| "System.Storage.GetReadOnlyContext"
| "System.Storage.AsReadOnly" => 1,
"System.Storage.Get" => 100,
"System.Storage.Put" => 1_000,
"System.Storage.Delete" => 100,
"System.Storage.Find" => 100,
"System.Iterator.Next" | "System.Iterator.Value" => 1,
"System.Runtime.Platform"
| "System.Runtime.GetTrigger"
| "System.Runtime.GetScriptContainer"
| "System.Runtime.GetNetwork"
| "System.Runtime.GetAddressVersion"
| "System.Runtime.GetTime"
| "System.Runtime.GasLeft"
| "System.Runtime.GetInvocationCounter"
| "System.Runtime.GetCallingScriptHash"
| "System.Runtime.GetEntryScriptHash"
| "System.Runtime.GetExecutingScriptHash"
| "System.Runtime.GetNotifications"
| "System.Runtime.BurnGas"
| "System.Runtime.CurrentSigners"
| "System.Runtime.GetMsgValue"
| "System.Runtime.LoadScript" => 1,
"System.Runtime.CheckWitness" => 200,
"System.Runtime.Log" | "System.Runtime.Notify" => 1,
"System.Runtime.GetRandom" => 50,
"System.Crypto.CheckSig" | "System.Crypto.CheckMultisig" => 1_000,
"System.Contract.Call" | "System.Contract.GetCallFlags" => 10,
"System.Contract.CreateStandardAccount" | "System.Contract.CreateMultisigAccount" => 10,
_ => 1,
};
m.insert(spec.id, gas);
}
m
}