{"id":31637773,"url":"https://github.com/macalinao/grill","last_synced_at":"2026-01-18T13:17:15.772Z","repository":{"id":309007121,"uuid":"1031794674","full_name":"macalinao/grill","owner":"macalinao","description":"TypeScript library for interacting with the Solana blockchain, built on Gill","archived":false,"fork":false,"pushed_at":"2025-10-03T07:47:05.000Z","size":3064,"stargazers_count":14,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-03T07:58:33.679Z","etag":null,"topics":["anchor","gill","react","rpc","solana"],"latest_commit_sha":null,"homepage":"https://grill.ianm.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/macalinao.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-04T10:43:58.000Z","updated_at":"2025-10-03T07:45:49.000Z","dependencies_parsed_at":"2025-08-09T08:35:26.491Z","dependency_job_id":"bd6d8d21-39a7-4473-93f2-59e5e079424b","html_url":"https://github.com/macalinao/grill","commit_stats":null,"previous_names":["macalinao/grill"],"tags_count":136,"template":false,"template_full_name":null,"purl":"pkg:github/macalinao/grill","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macalinao%2Fgrill","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macalinao%2Fgrill/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macalinao%2Fgrill/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macalinao%2Fgrill/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/macalinao","download_url":"https://codeload.github.com/macalinao/grill/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macalinao%2Fgrill/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278577933,"owners_count":26009701,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anchor","gill","react","rpc","solana"],"created_at":"2025-10-07T01:39:33.345Z","updated_at":"2025-10-07T01:39:58.242Z","avatar_url":"https://github.com/macalinao.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Grill - Modern Solana Development Kit\n\n[![npm version](https://img.shields.io/npm/v/@macalinao/grill.svg)](https://www.npmjs.com/package/@macalinao/grill)\n\nA comprehensive toolkit for building Solana applications with React, featuring automatic account batching, type-safe account decoding, and seamless transaction management. Built on top of [gill](https://github.com/gillsdk/gill) and [@solana/kit](https://github.com/anza-xyz/kit).\n\n## Packages\n\n### [@macalinao/grill](./packages/grill)\n\nReact provider for Solana account management with automatic batching and caching, built on top of @gillsdk/react.\n\n```bash\nbun add @macalinao/grill @gillsdk/react gill\n```\n\n### [@macalinao/solana-batch-accounts-loader](./packages/solana-batch-accounts-loader)\n\nDataLoader implementation for batching Solana account fetches.\n\n```bash\nbun add @macalinao/solana-batch-accounts-loader\n```\n\n### [@macalinao/wallet-adapter-compat](./packages/wallet-adapter-compat)\n\nCompatibility layer between @solana/wallet-adapter and @solana/kit.\n\n```bash\nbun add @macalinao/wallet-adapter-compat\n```\n\n### [@macalinao/dataloader-es](./packages/dataloader-es)\n\nES module compatible DataLoader implementation.\n\n```bash\nbun add @macalinao/dataloader-es\n```\n\n## Quick Start\n\n```tsx\nimport { GrillProvider } from \"@macalinao/grill\";\nimport { WalletAdapterCompatProvider } from \"@macalinao/wallet-adapter-compat\";\nimport { createSolanaClient } from \"gill\";\nimport { SolanaProvider } from \"@gillsdk/react\";\nimport {\n  ConnectionProvider,\n  WalletProvider,\n} from \"@solana/wallet-adapter-react\";\nimport { WalletModalProvider } from \"@solana/wallet-adapter-react-ui\";\nimport { QueryClient, QueryClientProvider } from \"@tanstack/react-query\";\nimport { Toaster } from \"sonner\";\n\nconst queryClient = new QueryClient();\nconst solanaClient = createSolanaClient({ urlOrMoniker: \"mainnet-beta\" });\n\nfunction App() {\n  const wallets = useMemo(\n    () =\u003e [new PhantomWalletAdapter(), new SolflareWalletAdapter()],\n    []\n  );\n\n  return (\n    \u003cQueryClientProvider client={queryClient}\u003e\n      \u003cSolanaProvider client={solanaClient}\u003e\n        \u003cConnectionProvider endpoint=\"https://api.mainnet-beta.solana.com\"\u003e\n          \u003cWalletProvider wallets={wallets} autoConnect\u003e\n            \u003cWalletModalProvider\u003e\n              \u003cWalletAdapterCompatProvider\u003e\n                \u003cGrillProvider\u003e\n                  {/* Your app components */}\n                  \u003cToaster position=\"bottom-right\" /\u003e\n                \u003c/GrillProvider\u003e\n              \u003c/WalletAdapterCompatProvider\u003e\n            \u003c/WalletModalProvider\u003e\n          \u003c/WalletProvider\u003e\n        \u003c/ConnectionProvider\u003e\n      \u003c/SolanaProvider\u003e\n    \u003c/QueryClientProvider\u003e\n  );\n}\n```\n\n## Core Features\n\n### 🎯 Automatic Account Batching\n\nMultiple account requests are automatically batched into single RPC calls:\n\n```tsx\nimport { useAccount, useAssociatedTokenAccount } from \"@macalinao/grill\";\n\nfunction Dashboard() {\n  // All these requests are batched into 1 RPC call!\n  const { data: userAccount } = useAccount({\n    address: userAddress,\n  });\n\n  const { data: usdcAccount } = useAssociatedTokenAccount({\n    mint: USDC_MINT,\n    owner: userAddress,\n  });\n\n  const { data: solAccount } = useAccount({\n    address: poolAddress,\n  });\n}\n```\n\n### 🔄 Simple Transaction Management\n\nSend transactions with automatic status notifications:\n\n```tsx\nimport { useSendTX, useKitWallet } from \"@macalinao/grill\";\n\nfunction SwapButton() {\n  const { signer } = useKitWallet();\n  const sendTX = useSendTX();\n\n  const handleSwap = async () =\u003e {\n    const instructions = buildSwapInstructions();\n    await sendTX(\"Swap USDC for SOL\", instructions);\n    // Automatic toast notifications for each stage!\n  };\n\n  return \u003cbutton onClick={handleSwap}\u003eSwap\u003c/button\u003e;\n}\n```\n\n### 📖 Type-Safe Account Decoding\n\n```tsx\nimport { useAccount } from \"@macalinao/grill\";\nimport { getTokenAccountDecoder } from \"@solana-program/token\";\n\nfunction TokenBalance({ tokenAccountAddress }) {\n  const { data: account } = useAccount({\n    address: tokenAccountAddress,\n    decoder: getTokenAccountDecoder(),\n  });\n\n  // account.data is fully typed as TokenAccount!\n  return \u003cdiv\u003eBalance: {account?.data.amount.toString()}\u003c/div\u003e;\n}\n```\n\n## Why Grill?\n\nTraditional Solana development suffers from the N+1 query problem. Every component that needs account data makes its own RPC request. Grill solves this with automatic batching using the DataLoader pattern from GraphQL.\n\n**Without Grill:** 10 components = 10 RPC calls = Rate limiting \u0026 slow UX  \n**With Grill:** 10 components = 1 batched RPC call = Fast \u0026 efficient\n\n## Key Benefits\n\n- ⚡ **10x fewer RPC calls** through automatic batching\n- 🎯 **Type-safe everything** - accounts, transactions, PDAs\n- 🔄 **Automatic cache management** with React Query\n- 🎨 **Beautiful transaction UX** with toast notifications\n- 🏗️ **Incremental migration** - works alongside existing code\n- 📦 **Modern stack** - Built on @solana/kit and gill\n\n## Works Great With\n\n### [@macalinao/coda](https://github.com/macalinao/coda)\n\nGrill pairs perfectly with **Coda**, our automated client generation tool for Solana programs. While Grill handles efficient account fetching and transaction management, Coda generates type-safe TypeScript clients from your Anchor IDLs automatically.\n\nTogether they provide:\n\n- **Zero boilerplate**: Coda generates the program clients, Grill batches the account fetches\n- **End-to-end type safety**: From IDL to UI components\n- **Automatic synchronization**: Keep your clients in sync with on-chain programs\n- **Production-ready code**: Both tools generate code that's ready for production use\n\n```bash\n# Generate type-safe clients with Coda\ncoda generate\n\n# Use the generated clients with Grill's batching\nimport { useAccount } from \"@macalinao/grill\";\nimport { getMyProgramDecoder } from \"./generated/myProgram\";\n\nfunction MyComponent() {\n  const { data } = useAccount({\n    address: programAccountAddress,\n    decoder: getMyProgramDecoder() // Generated by Coda!\n  });\n  // Fully typed account data with automatic batching\n}\n```\n\n## Documentation\n\nCheck out the comprehensive guides in [`docs/grill/`](./docs/grill/):\n\n1. [**Introduction**](./docs/grill/01-intro.md) - Why Grill and the core concepts\n2. [**Setup \u0026 Migration**](./docs/grill/02-setup.md) - Installation and incremental migration\n3. [**Reading Accounts**](./docs/grill/03-accounts.md) - Efficient account fetching with batching\n4. [**Making Transactions**](./docs/grill/04-transactions.md) - Clean transaction management\n5. [**Advanced Patterns**](./docs/grill/05-patterns.md) - Production patterns and best practices\n\n## Development\n\nThis is a Bun monorepo using Turbo for task orchestration.\n\n```bash\n# Install dependencies\nbun install\n\n# Build all packages\nbun run build\n\n# Run tests\nbun run test\n\n# Lint code\nbun run lint\n```\n\n## License\n\nCopyright (c) 2025 Ian Macalinao. Licensed under the Apache-2.0 License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacalinao%2Fgrill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmacalinao%2Fgrill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacalinao%2Fgrill/lists"}