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

remove direct helium-program-library dep in favor of helium-anchor-gen #575

Merged
merged 4 commits into from
Feb 2, 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
725 changes: 172 additions & 553 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ sqlx = {version = "0", features = [
"macros",
"runtime-tokio-rustls"
]}
helium-anchor-gen = {git = "https://github.com/helium/helium-anchor-gen.git"}
helium-crypto = {version = "0.8.1", features=["sqlx-postgres", "multisig"]}
helium-proto = {git = "https://github.com/helium/proto", branch = "master", features = ["services"]}
hextree = "*"
Expand Down Expand Up @@ -97,9 +98,6 @@ blake3 = "*"
retainer = "*"
rand = "0.8"
itertools = "*"
data-credits = {git = "https://github.com/helium/helium-program-library.git", tag = "v0.1.0"}
helium-sub-daos = {git = "https://github.com/helium/helium-program-library.git", tag = "v0.1.0"}
price-oracle = {git = "https://github.com/helium/helium-program-library.git", tag = "v0.1.0"}
tokio-util = "0"
uuid = {version = "1", features = ["v4", "serde"]}
tower-http = {version = "0", features = ["trace"]}
Expand Down
2 changes: 1 addition & 1 deletion price/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ metrics-exporter-prometheus = { workspace = true }
tokio = { workspace = true }
tokio-util = { workspace = true }
chrono = { workspace = true }
helium-anchor-gen = { workspace = true }
helium-proto = { workspace = true }
file-store = { path = "../file_store" }
poc-metrics = { path = "../metrics" }
triggered = {workspace = true}
solana-client = {workspace = true}
solana-sdk = {workspace = true}
task-manager = {path = "../task_manager"}
price-oracle = {workspace = true}
anchor-lang = {workspace = true}
2 changes: 1 addition & 1 deletion price/src/cli/check.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use anchor_lang::AccountDeserialize;
use anyhow::Result;
use chrono::{DateTime, TimeZone, Utc};
use price_oracle::PriceOracleV0;
use helium_anchor_gen::price_oracle::PriceOracleV0;
use solana_client::nonblocking::rpc_client::RpcClient;
use solana_sdk::pubkey::Pubkey as SolPubkey;
use std::str::FromStr;
Expand Down
2 changes: 1 addition & 1 deletion price/src/price_generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ use anyhow::{anyhow, Error, Result};
use chrono::{DateTime, Duration, TimeZone, Utc};
use file_store::file_sink;
use futures::{future::LocalBoxFuture, TryFutureExt};
use helium_anchor_gen::price_oracle::{calculate_current_price, PriceOracleV0};
use helium_proto::{BlockchainTokenTypeV1, PriceReportV1};
use price_oracle::{calculate_current_price, PriceOracleV0};
use serde::{Deserialize, Serialize};
use solana_client::nonblocking::rpc_client::RpcClient;
use solana_sdk::pubkey::Pubkey as SolPubkey;
Expand Down
3 changes: 1 addition & 2 deletions solana/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ async-trait = {workspace = true}
anchor-lang = {workspace = true}
anchor-client = {workspace = true}
clap = {workspace = true}
data-credits = {workspace = true}
futures = {workspace = true}
helium-anchor-gen = {workspace = true}
helium-crypto = {workspace = true, features = ["solana"]}
helium-sub-daos = {workspace = true}
metrics = {workspace = true}
serde = {workspace = true}
sha2 = {workspace = true}
Expand Down
8 changes: 5 additions & 3 deletions solana/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
use anchor_client::{RequestBuilder, RequestNamespace};
use anchor_lang::AccountDeserialize;
use async_trait::async_trait;
use data_credits::{accounts, instruction};
use helium_anchor_gen::{
data_credits::{self, accounts, instruction},
helium_sub_daos::{self, DaoV0, SubDaoV0},
};
use helium_crypto::PublicKeyBinary;
use helium_sub_daos::{DaoV0, SubDaoV0};
use serde::Deserialize;
use sha2::{Digest, Sha256};
use solana_client::{
Expand Down Expand Up @@ -247,7 +249,7 @@ impl SolanaNetwork for SolanaRpc {
registrar: self.program_cache.registrar,
};
let args = instruction::BurnDelegatedDataCreditsV0 {
args: data_credits::BurnDelegatedDataCreditsArgsV0 { amount },
_args: data_credits::BurnDelegatedDataCreditsArgsV0 { amount },
};

// As far as I can tell, the instructions function does not actually have any
Expand Down
2 changes: 1 addition & 1 deletion solana/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ fn main() {
sub_dao.as_ref(),
&sha_digest,
],
&data_credits::ID,
&helium_anchor_gen::data_credits::ID,
);
println!("https://explorer.solana.com/address/{ddc_key}");
}
Loading