This file contains hidden or 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
from solders.pubkey import Pubkey # type: ignore | |
from spl.token.instructions import get_associated_token_address | |
from construct import Padding, Struct, Int64ul, Flag | |
from walletTradingFunctions.config import client | |
from walletTradingFunctions.constants import PUMP_FUN_PROGRAM | |
# from config import client | |
# from constants import PUMP_FUN_PROGRAM | |
def get_virtual_reserves(bonding_curve: Pubkey): | |
bonding_curve_struct = Struct( |
This file contains hidden or 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
import os | |
# Set tokenizers parallelism before importing transformers | |
os.environ["TOKENIZERS_PARALLELISM"] = "false" | |
import subprocess | |
import json | |
import random | |
import requests | |
from pptx import Presentation | |
from pptx.util import Pt, Inches |
This file contains hidden or 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
[package] | |
name = "lottery" | |
version = "0.1.0" | |
description = "Created with Anchor" | |
edition = "2021" | |
[lib] | |
crate-type = ["cdylib", "lib"] | |
name = "lottery" |
This file contains hidden or 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
import tweepy | |
import os | |
import json | |
import time | |
from dotenv import load_dotenv | |
from datetime import datetime, timedelta | |
# Load environment variables from .env | |
load_dotenv() |
This file contains hidden or 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
(async function unfollowInactiveUsers() { | |
// Define a delay function with random variability | |
const delay = (min, max) => new Promise((resolve) => setTimeout(resolve, Math.random() * (max - min) + min)); | |
// Function to click the "Unfollow" button within the confirmation popup | |
async function confirmUnfollow() { | |
try { | |
// Select the "Unfollow" button in the confirmation dialog | |
const confirmButton = document.querySelector('button[data-testid="confirmationSheetConfirm"]'); | |
if (confirmButton) { |
This file contains hidden or 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
import os | |
import schedule | |
import time | |
import tweepy | |
import textwrap | |
from dotenv import load_dotenv | |
from random import randint | |
from openai import OpenAI | |
import requests |
This file contains hidden or 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
OX_API_KEY= | |
OX_API_SECRET= |
This file contains hidden or 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
import os | |
import schedule | |
import time | |
import tweepy | |
import textwrap | |
from dotenv import load_dotenv | |
from random import randint | |
from openai import OpenAI | |
This file contains hidden or 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
TELEGRAM_BOT_TOKEN=your-telegram-bot-token | |
PRIVATE_KEY=your-wallet-private-key | |
SOLANA_RPC_ENDPOINT=https://api.mainnet-beta.solana.com | |
FIXED_AMOUNT=1 # Replace with the fixed amount you want to buy every time |
This file contains hidden or 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
// SOL to SPL token price | |
use anyhow::{format_err, Result}; | |
use reqwest::Client; | |
use serde::{Deserialize, Serialize}; | |
use serde_json::Value; | |
use std::collections::HashMap; | |
use std::error::Error as StdError; | |
use std::time::{SystemTime, UNIX_EPOCH}; | |
// Constants |