-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use name in the code when generating new linera project (#2578)
* Convert Linera project name to Pascal case when creating contract/service files. * Use convert_case dep
- Loading branch information
Showing
7 changed files
with
52 additions
and
37 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
use linera_sdk::base::{ContractAbi, ServiceAbi}; | ||
use linera_sdk::base::{{ContractAbi, ServiceAbi}}; | ||
|
||
pub struct ApplicationAbi; | ||
pub struct {project_name}Abi; | ||
|
||
impl ContractAbi for ApplicationAbi { | ||
impl ContractAbi for {project_name}Abi {{ | ||
type Operation = (); | ||
type Response = (); | ||
} | ||
}} | ||
|
||
impl ServiceAbi for ApplicationAbi { | ||
impl ServiceAbi for {project_name}Abi {{ | ||
type Query = (); | ||
type QueryResponse = (); | ||
} | ||
}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
use linera_sdk::views::{linera_views, RegisterView, RootView, ViewStorageContext}; | ||
use linera_sdk::views::{{linera_views, RegisterView, RootView, ViewStorageContext}}; | ||
|
||
#[derive(RootView, async_graphql::SimpleObject)] | ||
#[view(context = "ViewStorageContext")] | ||
pub struct Application { | ||
pub struct {project_name} {{ | ||
pub value: RegisterView<u64>, | ||
// Add fields here. | ||
} | ||
}} |