#![cfg_attr(target_arch = "wasm32", no_main)] mod state; use self::state::{project_name}; use linera_sdk::{{ base::WithServiceAbi, views::{{View, ViewStorageContext}}, Service, ServiceRuntime, }}; pub struct {project_name}Service {{ state: {project_name}, runtime: ServiceRuntime, }} linera_sdk::service!({project_name}Service); impl WithServiceAbi for {project_name}Service {{ type Abi = {module_name}::{project_name}Abi; }} impl Service for {project_name}Service {{ type Parameters = (); async fn new(runtime: ServiceRuntime) -> Self {{ let state = {project_name}::load(runtime.root_view_storage_context()) .await .expect("Failed to load state"); {project_name}Service {{ state, runtime }} }} async fn handle_query(&self, _query: Self::Query) -> Self::QueryResponse {{ panic!("Queries not supported by application"); }} }}