Skip to content

Instantly share code, notes, and snippets.

@sbauch
sbauch / NFTFinder.tsx
Created February 23, 2022 16:58
React input component for getting an NFT's contract address and token ID from popular marketplace URL strings
// Please stop using the OpenSea API to load all of my NFTs.
// It's getting terribly unwieldy the more NFTs I own, and
// I don't want to sift through a needle in a haystack to
// find the NFT I want to select for display etc. You're
// also contributing to the idea that NFTs are centralized,
// plus putting unnecessary load on OS servers.
// Most users though aren't technical enough to understand
// contract addresses and token IDs. So instead of asking
// for those directly, use an input like this where a user
@sbauch
sbauch / ens-formula.js
Last active December 15, 2024 18:05
ENS names in Google Sheets
// Easily resolve addresses in a Google sheet to ENS names via @frolic's ENS resolution API - https://ensideas.com/about
// 1. In a Google sheet, select the menu item Extensions > Apps Script.
// 2. Replace the example code in the editor with the below function:
function LOOKUP_ENS(input) {
var endpoint = "https://api.ensideas.com/ens/resolve/" + input;
var response = UrlFetchApp.fetch(endpoint);
@sbauch
sbauch / useDelegatedAccount.ts
Created January 18, 2023 16:20
Example hook for using delegate cash with wagmi hooks.
import { useAccount, useContractRead } from 'wagmi';
import { abi, address as delegateCashAddress } from '~abis/delegateCash';
import { env } from '~env/client.mjs';
export function useDelegatedAccount() {
const { address, isConnected, ...account } = useAccount();
const txConfig = {
address: delegateCashAddress,
@sbauch
sbauch / alphabet.txt
Created November 28, 2023 04:58
ghost-writer
A,111111010011111
B,111111010101110
C,111111000110001
D,111111000101110
E,111111010110101
F,111111010010000
G,011101010110010
H,111110010011111
I,100011111110001
J,100111111110000