diff --git a/Cargo.toml b/Cargo.toml index 4f5be0e..58eb62d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,8 +14,8 @@ members = [ ] [workspace.dependencies] -anchor-gen = "0" -anchor-lang = "=0.29" +anchor-lang= "=0.29" +anchor-gen = { git = "https://github.com/ChewingGlass/anchor-gen.git", branch = "master" } [dependencies] anchor-gen = { workspace = true } diff --git a/programs/helium-entity-manager/src/lib.rs b/programs/helium-entity-manager/src/lib.rs index f5e5bdf..6fea333 100644 --- a/programs/helium-entity-manager/src/lib.rs +++ b/programs/helium-entity-manager/src/lib.rs @@ -1,2 +1,13 @@ anchor_gen::generate_cpi_crate!("../../idl/helium_entity_manager.json"); declare_id!("hemjuPXBpNvggtaUnN1MwT3wrdhttKEfosTcc2P9Pg8"); + +impl Default for ConfigSettingsV0 { + fn default() -> Self { + ConfigSettingsV0::IotConfig { + min_gain: 0, + max_gain: 10000000, + full_location_staking_fee: 0, + dataonly_location_staking_fee: 0, + } + } +} diff --git a/programs/helium-sub-daos/src/lib.rs b/programs/helium-sub-daos/src/lib.rs index 81759d0..eb212b4 100644 --- a/programs/helium-sub-daos/src/lib.rs +++ b/programs/helium-sub-daos/src/lib.rs @@ -1,2 +1,8 @@ anchor_gen::generate_cpi_crate!("../../idl/helium_sub_daos.json"); declare_id!("hdaoVTCqhfHHo75XdAMxBKdUqvq1i5bF23sisBqVgGR"); + +impl Default for Curve { + fn default() -> Self { + Curve::ExponentialCurveV0 { k: 1 } + } +} diff --git a/programs/treasury-management/src/lib.rs b/programs/treasury-management/src/lib.rs index 6e9d489..34887be 100644 --- a/programs/treasury-management/src/lib.rs +++ b/programs/treasury-management/src/lib.rs @@ -1,2 +1,9 @@ anchor_gen::generate_cpi_crate!("../../idl/treasury_management.json"); declare_id!("treaf4wWBBty3fHdyBpo35Mz84M8k3heKXmjmi9vFt5"); + +impl Default for Curve { + fn default() -> Self { + // Default: Linear + Curve::ExponentialCurveV0 { k: 1 } + } +}