Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(dna): amount range specified in grant pool, amount specified in grant #2

Merged
merged 1 commit into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dnas/grant_pools/zomes/integrity/grants/src/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ pub enum ApplicationStatus {
pub struct Application {
pub application_template: ActionHash,
pub content: String,
pub amount: U256,
pub status: ApplicationStatus,
}
pub fn validate_create_application(
Expand Down
8 changes: 8 additions & 0 deletions dnas/grant_pools/zomes/integrity/grants/src/grant_pool.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
use hdi::prelude::*;
use alloy_primitives::U256;

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
pub struct AmountRange {
min: U256,
max: U256,
}
#[hdk_entry_helper]
#[derive(Clone, PartialEq)]
pub struct GrantPool {
Expand All @@ -8,6 +15,7 @@ pub struct GrantPool {
pub time_period: ActionHash,
pub application_template: ActionHash,
pub evaluation_template: ActionHash,
pub amount_range: AmountRange,
}
pub fn validate_create_grant_pool(
_action: EntryCreationAction,
Expand Down
Loading