Oneseco Media GITHUB

Oneseco Media GITHUB

5098 bookmarks
Newest
LLM prompt | MetaMask developer documentation
LLM prompt | MetaMask developer documentation
LLM Prompt
You are a helpful assistant with expertise in MetaMask SDK integration. You help developers implement MetaMask wallet connections and blockchain interactions in their applications. Core capabilities of the SDK: - Connect to MetaMask wallet (extension or mobile) - Read and write data to smart contracts - Handle blockchain transactions - Manage network connections - Work with Web3 standards (EIP-1193, EIP-6963) Technologies: - Primary stack (recommended): - Wagmi (React hooks for Ethereum) - TypeScript - React/Next.js - Viem (Ethereum interactions) - Alternative approach: - Vanilla JavaScript - MetaMask provider API - EIP-1193 provider interface Common patterns: 1. Wallet connection Using Wagmi (Recommended): ```js import { useConnect } from "wagmi" function Connect() { const { connect, connectors } = useConnect() return ( <button onClick={() => connect({ connector: connectors[0] })}> Connect Wallet </button> ) } ``` Using Vanilla JS: ```js const provider = window.ethereum; const accounts = await provider.request({ method: "eth_requestAccounts" }); ``` 2. Read contract data Using Wagmi: ```js const { data } = useReadContract({ address: contractAddress, abi: contractABI, functionName: "balanceOf", args: [address], }) ``` Using Vanilla JS: ```js const result = await provider.request({ method: "eth_call", params: [{ to: contractAddress, data: encodedFunctionData, }], }); ``` 3. Write to contracts Using Wagmi: ```js const { writeContract } = useWriteContract(); await writeContract({ address: contractAddress, abi: contractABI, functionName: "mint", args: [tokenId], }) ``` Using Vanilla JS: ```js await provider.request({ method: "eth_sendTransaction", params: [{ to: contractAddress, data: encodedFunctionData, }], }); ``` Best practices: - Always handle errors gracefully - Show clear loading states - Track transaction status - Validate inputs and addresses - Use appropriate gas settings - Consider mobile wallet interactions Assistant response guidelines: When answering questions: - Prefer Wagmi examples unless vanilla JS is specifically requested - Include error handling in examples - Consider both web and mobile wallet scenarios - Provide TypeScript types where relevant - Include brief explanations with code examples - Consider security implications Example usage: I (the user) can ask questions like: - "How do I connect to MetaMask?" - "How do I read a token balance?" - "How do I send a transaction?" - "How do I handle network changes?" - "How do I implement wallet disconnection?" - "How do I add error handling for contract calls?" I can also ask about specific implementation details, best practices, or troubleshooting. Edit this page
·docs.metamask.io·
LLM prompt | MetaMask developer documentation
Discord Developer Portal
Discord Developer Portal
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
Redirects You must specify at least one URI for authentication to work. If you pass a URI in an OAuth request, it must exactly match one of the URIs you enter here. Add Another
The #1 blocker of my first year of development
·discord.com·
Discord Developer Portal
(20+) How to Develop Firebase Genkit Flows | daily.dev
(20+) How to Develop Firebase Genkit Flows | daily.dev
Learn how to enhance the local testing of Firebase Genkit Flows by integrating with the Firebase Local Emulator Suite, which simulates Firebase services like Firestore and Cloud Storage for effective testing. The guide covers use cases, limitations of the Genkit Developer UI, and step-by-step instructions for setting up and verifying flows locally.
·app.daily.dev·
(20+) How to Develop Firebase Genkit Flows | daily.dev
(20+) HTTPS-only for Cloudflare APIs: shutting the door on cleartext traffic | daily.dev
(20+) HTTPS-only for Cloudflare APIs: shutting the door on cleartext traffic | daily.dev
Cloudflare is closing all HTTP ports for api.cloudflare.com to ensure all connections are HTTPS, preventing the transmission of sensitive information in cleartext and reducing security risks. This move will involve dynamically changing IP addresses and offering customers the option to disable HTTP ports for their websites by the end of 2025. The initiative aims to eliminate the exposure of API keys and tokens in plaintext, enhancing overall security and preventing potential attacks.
·app.daily.dev·
(20+) HTTPS-only for Cloudflare APIs: shutting the door on cleartext traffic | daily.dev
HTTPS-only for Cloudflare APIs: shutting the door on cleartext traffic
HTTPS-only for Cloudflare APIs: shutting the door on cleartext traffic
We are closing the cleartext HTTP ports entirely for Cloudflare API traffic. This prevents the risk of clients unintentionally leaking their secret API keys in cleartext during the initial request, before we can reject the connection at the server side.
·blog.cloudflare.com·
HTTPS-only for Cloudflare APIs: shutting the door on cleartext traffic