use crate::types::Gas;
use std::hash::Hash;
#[derive(
Debug,
Clone,
Copy,
Hash,
PartialEq,
Eq,
serde_repr::Serialize_repr,
serde_repr::Deserialize_repr,
)]
#[repr(u8)]
pub enum AccountIdValidityRulesVersion {
/// Skip account ID validation according to legacy rules.
V0,
/// Limit `receiver_id` in `FunctionCallPermission` to be a valid account ID.
V1,
}
impl AccountIdValidityRulesVersion {
pub fn v0() -> AccountIdValidityRulesVersion {
AccountIdValidityRulesVersion::V0
}
}
/// Configuration of view methods execution, during which no costs should be charged.
#[derive(Default, Clone, serde::Serialize, serde::Deserialize, Debug, Hash, PartialEq, Eq)]
pub struct ViewConfig {
/// If specified, defines max burnt gas per view method.
pub max_gas_burnt: Gas,
}