Skip to content

Instantly share code, notes, and snippets.

@taycaldwell
taycaldwell / route.tsx
Created March 23, 2024 16:27
image api
import { NextRequest } from 'next/server'
import { ImageResponse } from "@vercel/og";
import { SECONDS_DURATION } from '@/utils/shared/seconds'
export const dynamic = 'error'
export const revalidate = SECONDS_DURATION.HOUR
export const runtime = 'edge'
export const FRAME_IMAGE_DIMENSIONS = {
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract MyNFT is ERC721, Ownable {
using Strings for uint256;
// Base URI
@taycaldwell
taycaldwell / Base_Logos.svg
Created September 10, 2023 02:54
Base_Logos.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@taycaldwell
taycaldwell / 300x300.svg
Created August 10, 2022 18:58
300x300.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@taycaldwell
taycaldwell / 512x512.svg
Created August 10, 2022 18:57
512x512.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@taycaldwell
taycaldwell / 1000x1000.svg
Created August 10, 2022 18:57
1000x1000.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@taycaldwell
taycaldwell / App.js
Created July 21, 2022 17:16
Multiple Web3Modal buttons
import { useState } from "react";
import { VStack, Button, HStack } from "@chakra-ui/react";
import { metamaskModal, coinbaseWalletModal, otherModal } from "./modals"; // import Web3Modals
export default function Home() {
// State variables
const [provider, setProvider] = useState();
const [modal, setModal] = useState();
// Connect to wallet given a wallet type
@taycaldwell
taycaldwell / modals.js
Created July 21, 2022 17:06
Multiple Web3Modal Instances.
import Web3Modal from "web3modal";
import WalletConnect from "@walletconnect/web3-provider";
import CoinbaseWalletSDK from "@coinbase/wallet-sdk";
import Portis from "@portis/web3";
// Metmamask (Injected Provider) Web3Modal Instance
export const metamaskModal = new Web3Modal({
cacheProvider: true, // optional
providerOptions: {
// Example with injected providers
@taycaldwell
taycaldwell / wc.svg
Last active July 19, 2022 20:42
WalletConnect Icon (SVG)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@taycaldwell
taycaldwell / mm.svg
Created July 19, 2022 20:40
Metamask Icon (SVG)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.