Skip to content

Instantly share code, notes, and snippets.

View cloakd's full-sized avatar

Cloakd cloakd

View GitHub Profile
{
"version": "0.1.0",
"name": "pump",
"instructions": [
{
"name": "initialize",
"docs": [
"Creates the global state."
],
"accounts": [
@cloakd
cloakd / postgres_gorm_tls.go
Created March 12, 2024 18:48
Postgres Gorm TLS Connection example
type PostgresService struct {
db *gorm.DB
username string
password string
database string
host string
port string
}
@cloakd
cloakd / chrono_idl.json
Last active February 29, 2024 15:19
chrono_idl
{
"version": "0.1.1",
"name": "solana_tribes",
"instructions": [
{
"name": "mintTokens",
"accounts": [
{
"name": "world",
"isMut": false,
package main
import (
"bytes"
"fmt"
"github.com/google/uuid"
"log"
"math/rand"
"net/http"
"time"
import {
createAssociatedTokenAccountInstruction,
createInitializeMint2Instruction,
createSyncNativeInstruction,
createTransferCheckedInstruction,
getAssociatedTokenAddressSync,
getMinimumBalanceForRentExemptMint,
MINT_SIZE,
TOKEN_2022_PROGRAM_ID
} from "@solana/spl-token";
{
"version": "1.0.0",
"name": "fluxbeam",
"instructions": [
{
"name": "initialize",
"accounts": [
{
"name": "swap",
"isMut": true,
package main
import (
"context"
"flag"
"github.com/alphabatem/fluxbot/helius"
"github.com/gagliardetto/solana-go"
"github.com/gagliardetto/solana-go/rpc"
"github.com/joho/godotenv"
"github.com/rs/zerolog/log"
@cloakd
cloakd / jupiter_airdrop_check.go
Last active December 2, 2023 15:23
Jupiter airdrop wallet checker - have all wallets in `users.csv` & specify the column to use via `-column`
package main
import (
"encoding/csv"
"encoding/json"
"errors"
"flag"
"fmt"
"io"
"log"
@cloakd
cloakd / rpc_speed.go
Created September 23, 2023 10:47
Simple go script used to test speed of RPC calls against multiple providers
package main
import (
ctx "context"
"fmt"
"github.com/gagliardetto/solana-go/rpc"
"log"
"time"
)