update readme
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
use mai3_pumpfun_sdk::instruction::logs_subscribe::tokens_subscription;
|
||||
use mai3_pumpfun_sdk::instruction::logs_events::DexEvent;
|
||||
use mai3_pumpfun_sdk::instruction::logs_subscribe::stop_subscription;
|
||||
use mai3_pumpfun_sdk::instruction::{
|
||||
logs_events::DexEvent,
|
||||
logs_subscribe::{tokens_subscription, stop_subscription}
|
||||
};
|
||||
use anchor_client::solana_sdk::commitment_config::CommitmentConfig;
|
||||
|
||||
use std::str::FromStr;
|
||||
@@ -8,19 +9,10 @@ use tokio::signal;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
start_token_subscription().await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn start_token_subscription() -> Result<(), Box<dyn std::error::Error>> {
|
||||
println!("Starting token subscription\n");
|
||||
|
||||
let ws_url = "wss://api.mainnet-beta.solana.com";
|
||||
|
||||
// Program address
|
||||
let program_address = "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P";
|
||||
|
||||
|
||||
// Set commitment
|
||||
let commitment = CommitmentConfig::confirmed();
|
||||
|
||||
@@ -42,7 +34,6 @@ pub async fn start_token_subscription() -> Result<(), Box<dyn std::error::Error>
|
||||
// Start subscription
|
||||
let subscription = tokens_subscription(
|
||||
ws_url,
|
||||
program_address,
|
||||
commitment,
|
||||
callback
|
||||
).await.unwrap();
|
||||
|
||||
Reference in New Issue
Block a user