Skip to content

Instantly share code, notes, and snippets.

View cloakd's full-sized avatar

Cloakd cloakd

View GitHub Profile
@cloakd
cloakd / sol_wrapping_contract.json
Created August 23, 2024 18:40
Flux wSOL wrapping contract
{
"version": "0.1.0",
"name": "sol_wrapping_contract",
"instructions": [
{
"name": "wrap",
"accounts": [
{
"name": "owner",
"isMut": true,
@cloakd
cloakd / check_words.sh
Last active August 20, 2024 14:06
Search for depreacted Solana RPC methods in files/folders.
#!/bin/bash
#######################################################################
#
# ██████ ██ ██████ █████ ██ ██ ██████ ██████ ███████ ██ ██
# ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
# ██ ██ ██ ██ ███████ █████ ██ ██ ██ ██ █████ ██ ██
# ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
# ██████ ███████ ██████ ██ ██ ██ ██ ██████ ██████ ███████ ████
#
{
"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"