This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useState } from "react"; | |
| import { usePrivy, useLogin, useFarcasterSigner } from "@privy-io/react-auth"; | |
| import { ExternalEd25519Signer, HubRestAPIClient } from "@standard-crypto/farcaster-js"; | |
| const TestSubmitCast = () => { | |
| const { authenticated, user } = usePrivy(); | |
| const { login } = useLogin(); | |
| const { getFarcasterSignerPublicKey, signFarcasterMessage, requestFarcasterSignerFromWarpcast } = useFarcasterSigner(); | |
| const [status, setStatus] = useState<"idle" | "posting" | "success" | "error">("idle"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { useState } from 'react'; | |
| import { ExternalEd25519Signer, HubRestAPIClient } from '@standard-crypto/farcaster-js'; | |
| import { useLogin, usePrivy, useFarcasterSigner } from '@privy-io/react-auth'; | |
| export default function Cast() { | |
| const [text, setText] = useState(''); | |
| const { login } = useLogin(); | |
| const { user } = usePrivy(); | |
| const { getFarcasterSignerPublicKey, signFarcasterMessage, requestFarcasterSignerFromWarpcast } = useFarcasterSigner(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const SCORES_TEST_FORM_DATA: RevnetFormData = { | |
| name: "Footy App Scores", | |
| description: "The Footy App tracks scores, where points are utilized and awarded within the app. A fraction of each purchase contributes to the community of open source developers and supporters.", | |
| logoUri: "", | |
| tokenName: "Footy Scores", | |
| tokenSymbol: "SCORES", | |
| stages: [ | |
| // 1. Keep the current first stage unchanged. | |
| { | |
| initialOperator: "0xDf087B724174A3E4eD2338C0798193932E851F1b", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Redis } from "@upstash/redis"; | |
| const redis = new Redis({ | |
| url: process.env.NEXT_PUBLIC_KV_REST_API_URL, | |
| token: process.env.NEXT_PUBLIC_KV_REST_API_TOKEN, | |
| }); | |
| function getTeamPreferencesKey(fid: number): string { | |
| return `fc-footy:preference:${fid}`; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const submitUserData = async () => { | |
| const server = "https://hub.farcaster.standardcrypto.vc:2281"; | |
| const url = `${server}/v1/submitMessage`; | |
| const fid = farcasterAccount?.fid; | |
| // Ensure fid exists | |
| if (!fid) { | |
| setStatus('Farcaster ID (FID) is missing'); | |
| return; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ CREATE TABLE IF NOT EXISTS standings ( | |
| id INTEGER PRIMARY KEY, | |
| event_total INTEGER, | |
| player_name VARCHAR(100), | |
| rank INTEGER, | |
| last_rank INTEGER, | |
| rank_sort INTEGER, | |
| total INTEGER, | |
| entry INTEGER, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| *** | |
| manager data insert without success alert - no window open | |
| javascript:(function(){const gunScript=document.createElement('script');gunScript.src='https://cdn.jsdelivr.net/npm/gun/gun.js';gunScript.onload=function(){const gun=Gun({peers:['https://gun-manhattan.herokuapp.com/gun']});const preElement=document.querySelector('pre');if(preElement){try{const jsonText=preElement.innerText.trim();console.log('Raw JSON text:',jsonText);const jsonData=JSON.parse(jsonText);console.log('Parsed JSON data:',jsonData);if(jsonData.new_entries&&jsonData.new_entries.results){jsonData.new_entries.results.forEach(user=>{const specificPath='kmac1fepl/users';const userId=user.entry.toString();const userObject={entry:user.entry,entry_name:user.entry_name,joined_time:user.joined_time,player_first_name:user.player_first_name,player_last_name:user.player_last_name};gun.get(specificPath).get(userId).put(userObject,ack=>{if(ack.err){console.error('Error inserting data:',ack.err);alert('Error inserting data: '+ack.err);}else{console.l |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import type { InferGetServerSidePropsType, GetServerSideProps } from "next"; | |
| import Head from "next/head"; | |
| import { | |
| fetchMetadata, | |
| metadataToMetaTags, | |
| } from "frames.js/next/pages-router/client"; | |
| import { | |
| FrameUI, | |
| fallbackFrameContext, | |
| FrameContext, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { FarcasterNetwork, Message, makeCastAdd, NobleEd25519Signer } from "@farcaster/core"; | |
| import axios from "axios"; | |
| import sendBio from './bioUpdate'; | |
| import sendAi from './ai'; | |
| import { CastLengthLimit, NeynarAPI } from "../constants/constants"; | |
| const sendCast = async ( | |
| newPost: string, | |
| setNewPost: React.Dispatch<React.SetStateAction<string>>, | |
| setRemainingChars: React.Dispatch<React.SetStateAction<number>>, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import styles from "./Farcaster.module.css"; | |
| import React, { useState, useEffect } from "react"; | |
| //import styles from "./DeployerInfo.module.css"; | |
| import * as ed from '@noble/ed25519'; | |
| import axios from "axios"; | |
| import QRCode from "react-qr-code"; | |
| import Button from "../../../UI/Button"; | |
| const generateKeyPair = async () => { | |
| const privateKey = ed.utils.randomPrivateKey(); |
NewerOlder