generated from okp4/template-rust
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -13,5 +13,6 @@ | |
pub mod contract; | ||
mod error; | ||
pub mod msg; | ||
pub mod state; | ||
|
||
pub use crate::error::ContractError; |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
use schemars::JsonSchema; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
use cw_storage_plus::Item; | ||
|
||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] | ||
pub struct Law { | ||
/// The `cw-storage` object link to the Prolog program carrying law rules and facts. | ||
pub program: Object, | ||
|
||
/// The list of all `cw-storage` dependencies of the law program. | ||
pub dependencies: Vec<String>, | ||
} | ||
|
||
/// Represent a link to an Object stored in the `cw-storage` contract. | ||
pub struct Object { | ||
/// The object id in the `cw-storage` contract. | ||
pub object_id: String, | ||
|
||
/// The `cw-storage` contract address on which the object is stored. | ||
pub storage_address: String, | ||
} | ||
|
||
pub const LAW: Item<'_, Law> = Item::new("law"); |