Skip to content

Instantly share code, notes, and snippets.

View mertimus's full-sized avatar

0xmert mertimus

View GitHub Profile
const axios = require('axios');
const apiURL = "https://api.helius.xyz/v0/addresses";
const address = "9MynErYQ5Qi6obp4YwwdoDmXkZ1hYVtPUqYmJJ3rZ9Kn"; // DeGods
const resource = "nft-events";
const options = `api-key=<your-api-key-here>&type=NFT_LISTING`;
let mostRecentTxn = "";
const listingThreshold = 200; // SOL
const LAMPORTS_PER_SOL = 1000000000;
const axios = require('axios');
const apiURL = 'https://api.helius.xyz/v0/addresses/';
const resource = '/transactions';
const options = '?api-key=d63a869e-bb73-4792-ae33-a06f4c72f226&before=';
let lastTxn = '';
const SOL_PER_LAMPORT = 0.000000001;
const getAllTxns = async (address) => {
const allTxns = [];
const axios = require('axios');
const apiURL = 'https://api.helius.xyz/v0/addresses/';
const address = '8cRrU1NzNpjL3k2BwjW3VixAcX6VFc29KHr4KZg8cs2Y';
const resource = '/transactions';
const options = '?api-key=d63a869e-bb73-4792-ae33-a06f4c72f226&before=';
let lastTxn = '';
const allTxns = [];
const getAllTxns = async () => {
import { serialize, deserializeUnchecked } from 'borsh';
import { Connection, PublicKey, Struct } from '@solana/web3.js';
const Base58 = require("base-58")
import * as beet from '@metaplex-foundation/beet';
const url = "rpc url";
const solanaConnection = new Connection(url,'confirmed');
// metaplex source: https://github.com/metaplex-foundation/metaplex-program-library/blob/master/auction-house/js/src/generated/instructions/executeSale.ts#L17
const solanaWeb3 = require('@solana/web3.js');
const rpc = "https://ssc-dao.genesysgo.net";
const magicEdenPubKey = new solanaWeb3.PublicKey("M2mx93ekt1fmXSVkTrUL9xVFHkmME8HTUi5Cyc5aF7K")
const solanaConnection = new solanaWeb3.Connection(rpc, 'confirmed');
const runMagicEdenParser = async () => {
// get latest 1000 transactions happening on Magic Eden
const magicEdenSignatures = await solanaConnection.getSignaturesForAddress(magicEdenPubKey);
@mertimus
mertimus / sales-bot.js
Last active July 4, 2022 12:45
Solana NFT bot
const solanaWeb3 = require('@solana/web3.js');
const { Connection, programs } = require('@metaplex/js')
const axios = require('axios');
// Check if the env variables have been set
if(!process.env.PROJECT_ADDRESS || !process.env.DISCORD_URL) {
console.log("Please set your environment variables!")
return;
}