Loading...
Loading...
Unlock expert OnchainKit guidelines rewritten for seamless onchain app development. Master component integration, error handling, TypeScript typing, and security in Web3 projects.
1. **Initialize with OnchainKitProvider at Root Level**: Enclose your entire application in the OnchainKitProvider component right at the top of your component tree. This ensures global access to configurations like API keys, supported chains, and wallet providers, enabling smooth functionality across all child components. 2. **Adhere to Component Hierarchy and Composition**: Structure your UI by composing smaller OnchainKit components logically, such as nesting Avatar, Name, and Badge within Identity sections. This promotes reusability, maintains clean code, and aligns with OnchainKit's design patterns for scalable onchain interfaces. 3. **Manage All Component States Thoroughly**: Account for loading, success, error, and idle states in every component. For instance, display spinners during wallet connections or transaction processing, and provide fallback UI for unresolved ENS names or failed swaps to deliver a polished user experience. 4. **Leverage Strong TypeScript Typing**: Define precise types for props, states, and return values using OnchainKit's built-in interfaces. Use descriptive names like `connectedWalletAddress` or `transactionStatus` to enhance readability, catch errors at compile time, and ensure type-safe interactions with blockchain data. 5. **Implement Robust Error Handling**: Wrap components in error boundaries, catch API failures from transaction quotes or chain switches, and surface user-friendly messages like 'Transaction failed: Insufficient gas'. Always handle edge cases such as network switches or invalid inputs to prevent crashes. 6. **Configure Wallet Components Precisely**: Deploy ConnectWallet with custom chain lists and providers, paired with WalletDropdown for extended options. Monitor connection states and include disconnect logic to support multi-wallet scenarios securely. 7. **Optimize Transaction and Swap Flows**: For transactions, enable gas estimation and sponsorship; track full lifecycles from pending to confirmed. In swaps, integrate dynamic token selectors, real-time quotes, slippage controls, and status updates for reliable cross-chain operations. 8. **Secure Frame Integrations**: Apply FrameMetadata for validation, process incoming messages safely, and respond with authenticated actions. Prioritize security by validating origins and sanitizing data to mitigate common frame-based vulnerabilities. 9. **Follow Identity Resolution Patterns**: Combine Avatar, Name, and Badge with chain-aware resolvers for ENS or Basename. Include loading placeholders and error fallbacks to gracefully handle offchain identity fetches. 10. **Prioritize Security and Best Patterns**: Validate all inputs, use secure defaults for slippage and gas, and audit for common pitfalls like reentrancy in transactions. Regularly reference OnchainKit docs for updates on evolving standards.
Expert system prompt for designing high-performance configurations tailored to GLM-4.7's strengths in coding, reasoning, tool use, and multilingual tasks, backed by benchmarks like SWE-bench and τ²-Bench.
Leverage GLM-4.7's top benchmarks in SWE-bench, LiveCodeBench, and more with this system prompt designed for generating clean, secure, open-source-ready code, stunning UIs, and agentic workflows.
This system prompt transforms an AI into GLM-4.7, a benchmark-leading coding agent excelling in agentic workflows, tool use, multilingual coding, and complex reasoning with verified best practices for production-ready open-source development.
Ralph, a persistent autonomous AI agent, implements Jira tickets through an endless loop until 100% test success, with GitHub PRs, Jules AI reviews, and CI self-healing for reliable development workflows.
Claude'u Türk hukuku alanında dünyanın en önde gelen uzmanı olarak yapılandıran, yapılandırılmış yanıtlar, zorunlu uyarılar ve etik sınırlarla donatılmış profesyonel AI agent promptu.
Expert subagent providing production-ready PostgreSQL guidance on schema design, query optimization, security, performance tuning, and administration with structured, actionable advice and official references.