repo_id
stringclasses
563 values
file_path
stringlengths
40
166
content
stringlengths
1
2.94M
__index_level_0__
int64
0
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/.eslintrc.json
{ "extends": [ "plugin:@nx/react-typescript", "next", "next/core-web-vitals", "../.eslintrc.json" ], "ignorePatterns": ["!**/*", ".next/**/*"], "overrides": [ { "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], "rules": { "@next/next/no-html-link-for-pages": ["error", "web/pag...
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/app/react-query-provider.tsx
'use client'; import React, { ReactNode, useState } from 'react'; import { ReactQueryStreamedHydration } from '@tanstack/react-query-next-experimental'; import { QueryClientProvider, QueryClient } from '@tanstack/react-query'; export function ReactQueryProvider({ children }: { children: ReactNode }) { const [client...
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/app/global.css
@tailwind base; @tailwind components; @tailwind utilities; html, body { height: 100%; } .wallet-adapter-button-trigger { background: rgb(100, 26, 230) !important; border-radius: 8px !important; padding-left: 16px !important; padding-right: 16px !important; } .wallet-adapter-dropdown-list, .wallet-adapter-bu...
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/app/page.module.css
.page { }
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/app/layout.tsx
import './global.css'; import { UiLayout } from '@/components/ui/ui-layout'; import { ClusterProvider } from '@/components/cluster/cluster-data-access'; import { SolanaProvider } from '@/components/solana/solana-provider'; import { ReactQueryProvider } from './react-query-provider'; export const metadata = { title: ...
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/app/page.tsx
import DashboardFeature from '@/components/dashboard/dashboard-feature'; export default function Page() { return <DashboardFeature />; }
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/app
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/app/clusters/page.tsx
import ClusterFeature from '@/components/cluster/cluster-feature'; export default function Page() { return <ClusterFeature />; }
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/app/api
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/app/api/vote/route.ts
import { ActionGetResponse, ActionPostRequest, ACTIONS_CORS_HEADERS, createPostResponse } from "@solana/actions"; import { Connection, PublicKey, Transaction } from "@solana/web3.js"; import { Voting } from "@/../anchor/target/types/voting"; import { BN, Program } from "@coral-xyz/anchor"; const IDL = require('@/../an...
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/app/api
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/app/api/hello/route.ts
export async function GET(request: Request) { return new Response('Hello, from API!'); }
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/app
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/app/counter/page.tsx
import CounterFeature from '@/components/counter/counter-feature'; export default function Page() { return <CounterFeature />; }
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/app
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/app/account/page.tsx
import AccountListFeature from '@/components/account/account-list-feature'; export default function Page() { return <AccountListFeature />; }
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/app/account
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/app/account/[address]/page.tsx
import AccountDetailFeature from '@/components/account/account-detail-feature'; export default function Page() { return <AccountDetailFeature />; }
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/components
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/components/ui/ui-layout.tsx
'use client'; import { WalletButton } from '../solana/solana-provider'; import * as React from 'react'; import { ReactNode, Suspense, useEffect, useRef } from 'react'; import Link from 'next/link'; import { usePathname } from 'next/navigation'; import { AccountChecker } from '../account/account-ui'; import { Clust...
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/components
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/components/cluster/cluster-data-access.tsx
'use client'; import { clusterApiUrl, Connection } from '@solana/web3.js'; import { atom, useAtomValue, useSetAtom } from 'jotai'; import { atomWithStorage } from 'jotai/utils'; import { createContext, ReactNode, useContext } from 'react'; import toast from 'react-hot-toast'; export interface Cluster { name: string...
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/components
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/components/cluster/cluster-ui.tsx
'use client'; import { useConnection } from '@solana/wallet-adapter-react'; import { IconTrash } from '@tabler/icons-react'; import { useQuery } from '@tanstack/react-query'; import { ReactNode, useState } from 'react'; import { AppModal } from '../ui/ui-layout'; import { ClusterNetwork, useCluster } from './cluster-d...
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/components
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/components/cluster/cluster-feature.tsx
'use client'; import { useState } from 'react'; import { AppHero } from '../ui/ui-layout'; import { ClusterUiModal } from './cluster-ui'; import { ClusterUiTable } from './cluster-ui'; export default function ClusterFeature() { const [showModal, setShowModal] = useState(false); return ( <div> <AppHero ...
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/components
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/components/solana/solana-provider.tsx
'use client'; import dynamic from 'next/dynamic'; import { AnchorProvider } from '@coral-xyz/anchor'; import { WalletError } from '@solana/wallet-adapter-base'; import { AnchorWallet, useConnection, useWallet, ConnectionProvider, WalletProvider, } from '@solana/wallet-adapter-react'; import { WalletModalProv...
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/components
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/components/dashboard/dashboard-feature.tsx
'use client'; import { AppHero } from '../ui/ui-layout'; const links: { label: string; href: string }[] = [ { label: 'Solana Docs', href: 'https://docs.solana.com/' }, { label: 'Solana Faucet', href: 'https://faucet.solana.com/' }, { label: 'Solana Cookbook', href: 'https://solanacookbook.com/' }, { label: 'S...
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/components
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/components/counter/counter-data-access.tsx
'use client'; import { getCounterProgram, getCounterProgramId } from '@voting-dapp/anchor'; import { Program } from '@coral-xyz/anchor'; import { useConnection } from '@solana/wallet-adapter-react'; import { Cluster, Keypair, PublicKey } from '@solana/web3.js'; import { useMutation, useQuery } from '@tanstack/react-qu...
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/components
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/components/counter/counter-feature.tsx
'use client'; import { useWallet } from '@solana/wallet-adapter-react'; import { WalletButton } from '../solana/solana-provider'; import { AppHero, ellipsify } from '../ui/ui-layout'; import { ExplorerLink } from '../cluster/cluster-ui'; import { useCounterProgram } from './counter-data-access'; import { CounterCreate...
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/components
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/components/counter/counter-ui.tsx
'use client'; import { Keypair, PublicKey } from '@solana/web3.js'; import { useMemo } from 'react'; import { ellipsify } from '../ui/ui-layout'; import { ExplorerLink } from '../cluster/cluster-ui'; import { useCounterProgram, useCounterProgramAccount, } from './counter-data-access'; export function CounterCreat...
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/components
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/components/account/account-data-access.tsx
'use client'; import { useConnection, useWallet } from '@solana/wallet-adapter-react'; import { TOKEN_2022_PROGRAM_ID, TOKEN_PROGRAM_ID } from '@solana/spl-token'; import { Connection, LAMPORTS_PER_SOL, PublicKey, SystemProgram, TransactionMessage, TransactionSignature, VersionedTransaction, } from '@sol...
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/components
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/components/account/account-ui.tsx
'use client'; import { useWallet } from '@solana/wallet-adapter-react'; import { LAMPORTS_PER_SOL, PublicKey } from '@solana/web3.js'; import { IconRefresh } from '@tabler/icons-react'; import { useQueryClient } from '@tanstack/react-query'; import { useMemo, useState } from 'react'; import { AppModal, ellipsify } fro...
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/components
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/components/account/account-detail-feature.tsx
'use client'; import { PublicKey } from '@solana/web3.js'; import { useMemo } from 'react'; import { useParams } from 'next/navigation'; import { ExplorerLink } from '../cluster/cluster-ui'; import { AppHero, ellipsify } from '../ui/ui-layout'; import { AccountBalance, AccountButtons, AccountTokens, AccountT...
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/components
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/components/account/account-list-feature.tsx
'use client'; import { useWallet } from '@solana/wallet-adapter-react'; import { WalletButton } from '../solana/solana-provider'; import { redirect } from 'next/navigation'; export default function AccountListFeature() { const { publicKey } = useWallet(); if (publicKey) { return redirect(`/account/${publicK...
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks
solana_public_repos/developer-bootcamp-2024/project-3-blinks/anchor/Cargo.toml
[workspace] members = ["programs/*"] resolver = "2" [profile.release] overflow-checks = true lto = "fat" codegen-units = 1 [profile.release.build-override] opt-level = 3 incremental = false codegen-units = 1
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks
solana_public_repos/developer-bootcamp-2024/project-3-blinks/anchor/project.json
{ "name": "anchor", "$schema": "../node_modules/nx/schemas/project-schema.json", "sourceRoot": "anchor/src", "projectType": "library", "tags": [], "targets": { "build": { "executor": "@nx/rollup:rollup", "outputs": ["{options.outputPath}"], "options": { "outputPath": "dist/anch...
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks
solana_public_repos/developer-bootcamp-2024/project-3-blinks/anchor/.swcrc
{ "jsc": { "target": "es2017", "parser": { "syntax": "typescript", "decorators": true, "dynamicImport": true }, "transform": { "decoratorMetadata": true, "legacyDecorator": true }, "keepClassNames": true, "externalHelpers": true, "loose": true }, "modu...
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks
solana_public_repos/developer-bootcamp-2024/project-3-blinks/anchor/Anchor.toml
[toolchain] [features] seeds = false skip-lint = false [programs.localnet] voting = "6RMzzoy8iRv9a6ATQbxva3p5GCLFtBukjVN195aBNmQ8" [registry] url = "https://api.apr.dev" [provider] cluster = "Localnet" wallet = "~/.config/solana/id.json" [scripts] test = "../node_modules/.bin/nx run anchor:jest" [test] startup_wa...
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks
solana_public_repos/developer-bootcamp-2024/project-3-blinks/anchor/package.json
{ "name": "@voting-dapp/anchor", "version": "0.0.1", "dependencies": { "@coral-xyz/anchor": "^0.30.0", "@solana/web3.js": "1.91.9", "anchor-bankrun": "^0.4.0", "solana-bankrun": "^0.2.0" }, "main": "./index.cjs", "module": "./index.js", "private": true }
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks
solana_public_repos/developer-bootcamp-2024/project-3-blinks/anchor/tsconfig.json
{ "extends": "../tsconfig.base.json", "compilerOptions": { "module": "commonjs" }, "files": [], "include": [], "references": [ { "path": "./tsconfig.lib.json" }, { "path": "./tsconfig.spec.json" } ] }
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks
solana_public_repos/developer-bootcamp-2024/project-3-blinks/anchor/tsconfig.lib.json
{ "extends": "./tsconfig.json", "compilerOptions": { "outDir": "../dist/out-tsc", "declaration": true, "types": ["node"], "resolveJsonModule": true, "allowSyntheticDefaultImports": true }, "include": ["src/**/*.ts"], "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"] }
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks
solana_public_repos/developer-bootcamp-2024/project-3-blinks/anchor/.eslintrc.json
{ "extends": ["../.eslintrc.json"], "ignorePatterns": ["!**/*"], "overrides": [ { "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], "rules": {} }, { "files": ["*.ts", "*.tsx"], "rules": {} }, { "files": ["*.js", "*.jsx"], "rules": {} }, { "files": [...
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks
solana_public_repos/developer-bootcamp-2024/project-3-blinks/anchor/tsconfig.spec.json
{ "extends": "./tsconfig.json", "compilerOptions": { "outDir": "../dist/out-tsc", "module": "commonjs", "types": ["jest", "node"] }, "include": [ "jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts" ] }
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks
solana_public_repos/developer-bootcamp-2024/project-3-blinks/anchor/jest.config.ts
/* eslint-disable */ import { readFileSync } from 'fs'; // Reading the SWC compilation config and remove the "exclude" // for the test files to be compiled by SWC const { exclude: _, ...swcJestConfig } = JSON.parse( readFileSync(`${__dirname}/.swcrc`, 'utf-8') ); // disable .swcrc look-up by SWC core because we're ...
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks/anchor
solana_public_repos/developer-bootcamp-2024/project-3-blinks/anchor/migrations/deploy.ts
// Migrations are an early feature. Currently, they're nothing more than this // single deploy script that's invoked from the CLI, injecting a provider // configured from the workspace's Anchor.toml. import * as anchor from '@coral-xyz/anchor'; module.exports = async function (provider) { // Configure client to use...
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks/anchor
solana_public_repos/developer-bootcamp-2024/project-3-blinks/anchor/tests/voting.spec.ts
import { PartialAccounts } from './../node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/methods.d'; import * as anchor from '@coral-xyz/anchor'; import { Program } from '@coral-xyz/anchor'; import { Keypair, PublicKey, SystemProgram } from '@solana/web3.js'; import { Voting } from '../target/types/voting'; impo...
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks/anchor/programs
solana_public_repos/developer-bootcamp-2024/project-3-blinks/anchor/programs/voting/Cargo.toml
[package] name = "voting" version = "0.1.0" description = "Created with Anchor" edition = "2021" [lib] crate-type = ["cdylib", "lib"] name = "voting" [features] no-entrypoint = [] no-idl = [] no-log-ix-name = [] cpi = ["no-entrypoint"] default = [] idl-build = ["anchor-lang/idl-build"] [dependencies] anchor-lang = "...
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks/anchor/programs
solana_public_repos/developer-bootcamp-2024/project-3-blinks/anchor/programs/voting/Xargo.toml
[target.bpfel-unknown-unknown.dependencies.std] features = []
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks/anchor/programs/voting
solana_public_repos/developer-bootcamp-2024/project-3-blinks/anchor/programs/voting/src/lib.rs
#![allow(clippy::result_large_err)] use anchor_lang::prelude::*; declare_id!("6RMzzoy8iRv9a6ATQbxva3p5GCLFtBukjVN195aBNmQ8"); #[program] pub mod voting { use super::*; pub fn initialize_poll(ctx: Context<InitializePoll>, poll_id: u64, description: Str...
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks/anchor
solana_public_repos/developer-bootcamp-2024/project-3-blinks/anchor/src/index.ts
// This file was generated by preset-anchor. Programs are exported from this file. export * from './counter-exports';
0
solana_public_repos/developer-bootcamp-2024/project-3-blinks/anchor
solana_public_repos/developer-bootcamp-2024/project-3-blinks/anchor/src/counter-exports.ts
// Here we export some useful types and functions for interacting with the Anchor program. import { AnchorProvider, Program } from '@coral-xyz/anchor'; import { Cluster, PublicKey } from '@solana/web3.js'; import CounterIDL from '../target/idl/counter.json'; import type { Counter } from '../target/types/counter'; // R...
0
solana_public_repos/developer-bootcamp-2024
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/jest.preset.js
const nxPreset = require('@nx/jest/preset').default; module.exports = { ...nxPreset };
0
solana_public_repos/developer-bootcamp-2024
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/nx.json
{ "$schema": "./node_modules/nx/schemas/nx-schema.json", "defaultBase": "master", "namedInputs": { "default": ["{projectRoot}/**/*", "sharedGlobals"], "production": [ "default", "!{projectRoot}/.eslintrc.json", "!{projectRoot}/eslint.config.js", "!{projectRoot}/**/?(*.)+(spec|test)...
0
solana_public_repos/developer-bootcamp-2024
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/LICENSE
MIT License Copyright (c) 2024 jacobcreech Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distr...
0
solana_public_repos/developer-bootcamp-2024
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/vercel.json
{ "buildCommand": "npm run build", "outputDirectory": "dist/web/.next" }
0
solana_public_repos/developer-bootcamp-2024
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/tsconfig.base.json
{ "compileOnSave": false, "compilerOptions": { "rootDir": ".", "sourceMap": true, "declaration": false, "moduleResolution": "node", "emitDecoratorMetadata": true, "experimentalDecorators": true, "importHelpers": true, "target": "es2015", "module": "esnext", "lib": ["es2020", ...
0
solana_public_repos/developer-bootcamp-2024
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/package.json
{ "name": "@voting-dapp/source", "version": "0.0.0", "license": "MIT", "scripts": { "anchor": "nx run anchor:anchor", "anchor-build": "nx run anchor:anchor build", "anchor-localnet": "nx run anchor:anchor localnet", "anchor-test": "nx run anchor:anchor test", "feature": "nx generate @solana-...
0
solana_public_repos/developer-bootcamp-2024
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/jest.config.ts
import { getJestProjectsAsync } from '@nx/jest'; export default async () => ({ projects: await getJestProjectsAsync(), });
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/tailwind.config.js
const { createGlobPatternsForDependencies } = require('@nx/react/tailwind'); const { join } = require('path'); /** @type {import('tailwindcss').Config} */ module.exports = { content: [ join( __dirname, '{src,pages,components,app}/**/*!(*.stories|*.spec).{ts,tsx,html}' ), ...createGlobPatterns...
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/project.json
{ "name": "web", "$schema": "../node_modules/nx/schemas/project-schema.json", "sourceRoot": "web", "projectType": "application", "tags": [], "targets": { "build": { "executor": "@nx/next:build", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options":...
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/next.config.js
//@ts-check // eslint-disable-next-line @typescript-eslint/no-var-requires const { composePlugins, withNx } = require('@nx/next'); /** * @type {import('@nx/next/plugins/with-nx').WithNxOptions} **/ const nextConfig = { webpack: (config) => { config.externals = [ ...(config.externals || []), 'bigin...
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/next-env.d.ts
/// <reference types="next" /> /// <reference types="next/image-types/global" /> // NOTE: This file should not be edited // see https://nextjs.org/docs/basic-features/typescript for more information.
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/tsconfig.json
{ "extends": "../tsconfig.base.json", "compilerOptions": { "jsx": "preserve", "allowJs": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, "strict": true, "forceConsistentCasingInFileNames": true, "noEmit": true, "resolveJsonModule": true, "isolatedModules": tr...
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/index.d.ts
/* eslint-disable @typescript-eslint/no-explicit-any */ declare module '*.svg' { const content: any; export const ReactComponent: any; export default content; }
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/postcss.config.js
const { join } = require('path'); // Note: If you use library-specific PostCSS/Tailwind configuration then you should remove the `postcssConfig` build // option from your application's configuration (i.e. project.json). // // See: https://nx.dev/guides/using-tailwind-css-in-react#step-4:-applying-configuration-to-libr...
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/.eslintrc.json
{ "extends": [ "plugin:@nx/react-typescript", "next", "next/core-web-vitals", "../.eslintrc.json" ], "ignorePatterns": ["!**/*", ".next/**/*"], "overrides": [ { "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], "rules": { "@next/next/no-html-link-for-pages": ["error", "web/pag...
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/app/react-query-provider.tsx
'use client'; import React, { ReactNode, useState } from 'react'; import { ReactQueryStreamedHydration } from '@tanstack/react-query-next-experimental'; import { QueryClientProvider, QueryClient } from '@tanstack/react-query'; export function ReactQueryProvider({ children }: { children: ReactNode }) { const [client...
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/app/global.css
@tailwind base; @tailwind components; @tailwind utilities; html, body { height: 100%; } .wallet-adapter-button-trigger { background: rgb(100, 26, 230) !important; border-radius: 8px !important; padding-left: 16px !important; padding-right: 16px !important; } .wallet-adapter-dropdown-list, .wallet-adapter-bu...
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/app/page.module.css
.page { }
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/app/layout.tsx
import './global.css'; import { UiLayout } from '@/components/ui/ui-layout'; import { ClusterProvider } from '@/components/cluster/cluster-data-access'; import { SolanaProvider } from '@/components/solana/solana-provider'; import { ReactQueryProvider } from './react-query-provider'; export const metadata = { title: ...
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/app/page.tsx
import VotingFeature from '@/components/voting/voting-feature'; export default function Page() { return <VotingFeature />; }
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/app/api
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/app/api/vote/route.ts
import { ActionGetResponse, ActionPostRequest, ACTIONS_CORS_HEADERS, createPostResponse } from "@solana/actions"; import { Connection, PublicKey, Transaction } from "@solana/web3.js"; import { Voting } from "@/../anchor/target/types/voting"; import { BN, Program } from "@coral-xyz/anchor"; const IDL = require('@/../an...
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/app/api
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/app/api/hello/route.ts
export async function GET(request: Request) { return new Response('Hello, from API!'); }
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/components
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/components/ui/ui-layout.tsx
'use client'; import { WalletButton } from '../solana/solana-provider'; import * as React from 'react'; import { ReactNode, Suspense, useEffect, useRef } from 'react'; import Link from 'next/link'; import { usePathname } from 'next/navigation'; import { AccountChecker } from '../account/account-ui'; import { Clust...
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/components
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/components/cluster/cluster-data-access.tsx
'use client'; import { clusterApiUrl, Connection } from '@solana/web3.js'; import { atom, useAtomValue, useSetAtom } from 'jotai'; import { atomWithStorage } from 'jotai/utils'; import { createContext, ReactNode, useContext } from 'react'; import toast from 'react-hot-toast'; export interface Cluster { name: string...
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/components
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/components/cluster/cluster-ui.tsx
'use client'; import { useConnection } from '@solana/wallet-adapter-react'; import { IconTrash } from '@tabler/icons-react'; import { useQuery } from '@tanstack/react-query'; import { ReactNode, useState } from 'react'; import { AppModal } from '../ui/ui-layout'; import { ClusterNetwork, useCluster } from './cluster-d...
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/components
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/components/cluster/cluster-feature.tsx
'use client'; import { useState } from 'react'; import { AppHero } from '../ui/ui-layout'; import { ClusterUiModal } from './cluster-ui'; import { ClusterUiTable } from './cluster-ui'; export default function ClusterFeature() { const [showModal, setShowModal] = useState(false); return ( <div> <AppHero ...
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/components
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/components/voting/voting-data-access.tsx
'use client'; import { getVotingProgram, getVotingProgramId } from '@voting-dapp/anchor'; import { Program, BN } from '@coral-xyz/anchor'; import { useConnection } from '@solana/wallet-adapter-react'; import { Cluster, PublicKey } from '@solana/web3.js'; import { useMutation, useQuery } from '@tanstack/react-query'; i...
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/components
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/components/voting/voting-feature.tsx
'use client'; import { useWallet } from '@solana/wallet-adapter-react'; import { WalletButton } from '../solana/solana-provider'; import { AppHero, ellipsify } from '../ui/ui-layout'; import { ExplorerLink } from '../cluster/cluster-ui'; import { useVotingProgram } from './voting-data-access'; import { CandidateList, ...
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/components
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/components/voting/voting-ui.tsx
'use client'; import { ellipsify } from '../ui/ui-layout'; import { ExplorerLink } from '../cluster/cluster-ui'; import { useVotingProgram, useVotingProgramCandidateAccount, } from './voting-data-access'; import { useEffect, useMemo, useState } from 'react'; import { PublicKey } from '@solana/web3.js'; export fu...
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/components
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/components/solana/solana-provider.tsx
'use client'; import dynamic from 'next/dynamic'; import { AnchorProvider } from '@coral-xyz/anchor'; import { WalletError } from '@solana/wallet-adapter-base'; import { AnchorWallet, useConnection, useWallet, ConnectionProvider, WalletProvider, } from '@solana/wallet-adapter-react'; import { WalletModalProv...
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/components
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/components/dashboard/dashboard-feature.tsx
'use client'; import { AppHero } from '../ui/ui-layout'; const links: { label: string; href: string }[] = [ { label: 'Solana Docs', href: 'https://docs.solana.com/' }, { label: 'Solana Faucet', href: 'https://faucet.solana.com/' }, { label: 'Solana Cookbook', href: 'https://solanacookbook.com/' }, { label: 'S...
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/components
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/components/counter/counter-data-access.tsx
'use client'; import { getCounterProgram, getCounterProgramId } from '@voting-dapp/anchor'; import { Program } from '@coral-xyz/anchor'; import { useConnection } from '@solana/wallet-adapter-react'; import { Cluster, Keypair, PublicKey } from '@solana/web3.js'; import { useMutation, useQuery } from '@tanstack/react-qu...
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/components
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/components/counter/counter-feature.tsx
'use client'; import { useWallet } from '@solana/wallet-adapter-react'; import { WalletButton } from '../solana/solana-provider'; import { AppHero, ellipsify } from '../ui/ui-layout'; import { ExplorerLink } from '../cluster/cluster-ui'; import { useCounterProgram } from './counter-data-access'; import { CounterCreate...
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/components
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/components/counter/counter-ui.tsx
'use client'; import { Keypair, PublicKey } from '@solana/web3.js'; import { useMemo } from 'react'; import { ellipsify } from '../ui/ui-layout'; import { ExplorerLink } from '../cluster/cluster-ui'; import { useCounterProgram, useCounterProgramAccount, } from './counter-data-access'; export function CounterCreat...
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/components
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/components/account/account-data-access.tsx
'use client'; import { useConnection, useWallet } from '@solana/wallet-adapter-react'; import { TOKEN_2022_PROGRAM_ID, TOKEN_PROGRAM_ID } from '@solana/spl-token'; import { Connection, LAMPORTS_PER_SOL, PublicKey, SystemProgram, TransactionMessage, TransactionSignature, VersionedTransaction, } from '@sol...
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/components
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/components/account/account-ui.tsx
'use client'; import { useWallet } from '@solana/wallet-adapter-react'; import { LAMPORTS_PER_SOL, PublicKey } from '@solana/web3.js'; import { IconRefresh } from '@tabler/icons-react'; import { useQueryClient } from '@tanstack/react-query'; import { useMemo, useState } from 'react'; import { AppModal, ellipsify } fro...
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/components
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/components/account/account-detail-feature.tsx
'use client'; import { PublicKey } from '@solana/web3.js'; import { useMemo } from 'react'; import { useParams } from 'next/navigation'; import { ExplorerLink } from '../cluster/cluster-ui'; import { AppHero, ellipsify } from '../ui/ui-layout'; import { AccountBalance, AccountButtons, AccountTokens, AccountT...
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/components
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/web/components/account/account-list-feature.tsx
'use client'; import { useWallet } from '@solana/wallet-adapter-react'; import { WalletButton } from '../solana/solana-provider'; import { redirect } from 'next/navigation'; export default function AccountListFeature() { const { publicKey } = useWallet(); if (publicKey) { return redirect(`/account/${publicK...
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/anchor/Cargo.toml
[workspace] members = ["programs/*"] resolver = "2" [profile.release] overflow-checks = true lto = "fat" codegen-units = 1 [profile.release.build-override] opt-level = 3 incremental = false codegen-units = 1
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/anchor/project.json
{ "name": "anchor", "$schema": "../node_modules/nx/schemas/project-schema.json", "sourceRoot": "anchor/src", "projectType": "library", "tags": [], "targets": { "build": { "executor": "@nx/rollup:rollup", "outputs": ["{options.outputPath}"], "options": { "outputPath": "dist/anch...
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/anchor/.swcrc
{ "jsc": { "target": "es2017", "parser": { "syntax": "typescript", "decorators": true, "dynamicImport": true }, "transform": { "decoratorMetadata": true, "legacyDecorator": true }, "keepClassNames": true, "externalHelpers": true, "loose": true }, "modu...
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/anchor/Anchor.toml
[toolchain] [features] seeds = false skip-lint = false [programs.localnet] voting = "HDxHrQL4N5GaBo19UjEF3sypkrGiDijjuGyQXBNhnrKB" [registry] url = "https://api.apr.dev" [provider] cluster = "Localnet" wallet = "~/.config/solana/id.json" [scripts] test = "../node_modules/.bin/nx run anchor:jest" [test] startup_wa...
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/anchor/package.json
{ "name": "@voting-dapp/anchor", "version": "0.0.1", "dependencies": { "@coral-xyz/anchor": "^0.30.0", "@solana/web3.js": "1.91.9", "anchor-bankrun": "^0.4.0" }, "main": "./index.cjs", "module": "./index.js", "private": true }
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/anchor/tsconfig.json
{ "extends": "../tsconfig.base.json", "compilerOptions": { "module": "commonjs" }, "files": [], "include": [], "references": [ { "path": "./tsconfig.lib.json" }, { "path": "./tsconfig.spec.json" } ] }
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/anchor/tsconfig.lib.json
{ "extends": "./tsconfig.json", "compilerOptions": { "outDir": "../dist/out-tsc", "declaration": true, "types": ["node"], "resolveJsonModule": true, "allowSyntheticDefaultImports": true }, "include": ["src/**/*.ts"], "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"] }
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/anchor/.eslintrc.json
{ "extends": ["../.eslintrc.json"], "ignorePatterns": ["!**/*"], "overrides": [ { "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], "rules": {} }, { "files": ["*.ts", "*.tsx"], "rules": {} }, { "files": ["*.js", "*.jsx"], "rules": {} }, { "files": [...
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/anchor/tsconfig.spec.json
{ "extends": "./tsconfig.json", "compilerOptions": { "outDir": "../dist/out-tsc", "module": "commonjs", "types": ["jest", "node"] }, "include": [ "jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts" ] }
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/anchor/jest.config.ts
/* eslint-disable */ import { readFileSync } from 'fs'; // Reading the SWC compilation config and remove the "exclude" // for the test files to be compiled by SWC const { exclude: _, ...swcJestConfig } = JSON.parse( readFileSync(`${__dirname}/.swcrc`, 'utf-8') ); // disable .swcrc look-up by SWC core because we're ...
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/anchor
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/anchor/migrations/deploy.ts
// Migrations are an early feature. Currently, they're nothing more than this // single deploy script that's invoked from the CLI, injecting a provider // configured from the workspace's Anchor.toml. import * as anchor from '@coral-xyz/anchor'; module.exports = async function (provider) { // Configure client to use...
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/anchor
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/anchor/tests/voting.spec.ts
import { PartialAccounts } from '@coral-xyz/anchor/dist/cjs/program/namespace/methods'; import * as anchor from '@coral-xyz/anchor'; import { Program } from '@coral-xyz/anchor'; import { Keypair, PublicKey, SystemProgram } from '@solana/web3.js'; import { Voting } from '../target/types/voting'; import { startAnchor } f...
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/anchor/programs
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/anchor/programs/voting/Cargo.toml
[package] name = "voting" version = "0.1.0" description = "Created with Anchor" edition = "2021" [lib] crate-type = ["cdylib", "lib"] name = "voting" [features] no-entrypoint = [] no-idl = [] no-log-ix-name = [] cpi = ["no-entrypoint"] default = [] idl-build = ["anchor-lang/idl-build"] [dependencies] anchor-lang = "...
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/anchor/programs
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/anchor/programs/voting/Xargo.toml
[target.bpfel-unknown-unknown.dependencies.std] features = []
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/anchor/programs/voting
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/anchor/programs/voting/src/lib.rs
#![allow(clippy::result_large_err)] use anchor_lang::prelude::*; declare_id!("HDxHrQL4N5GaBo19UjEF3sypkrGiDijjuGyQXBNhnrKB"); #[program] pub mod voting { use super::*; pub fn initialize_poll(ctx: Context<InitializePoll>, poll_id: u64, description: Str...
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/anchor
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/anchor/src/index.ts
// This file was generated by preset-anchor. Programs are exported from this file. export * from './voting-exports';
0
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/anchor
solana_public_repos/developer-bootcamp-2024/project-13-getting-to-production/anchor/src/voting-exports.ts
// Here we export some useful types and functions for interacting with the Anchor program. import { AnchorProvider, Program } from '@coral-xyz/anchor'; import { Cluster, PublicKey } from '@solana/web3.js'; import VotingIDL from '../target/idl/voting.json'; import type { Voting } from '../target/types/voting'; // Re-ex...
0
solana_public_repos/developer-bootcamp-2024
solana_public_repos/developer-bootcamp-2024/project-10-lending/Cargo.toml
[workspace] members = [ "programs/*" ] resolver = "2" [profile.release] overflow-checks = true lto = "fat" codegen-units = 1 [profile.release.build-override] opt-level = 3 incremental = false codegen-units = 1
0
solana_public_repos/developer-bootcamp-2024
solana_public_repos/developer-bootcamp-2024/project-10-lending/.prettierignore
.anchor .DS_Store target node_modules dist build test-ledger
0
solana_public_repos/developer-bootcamp-2024
solana_public_repos/developer-bootcamp-2024/project-10-lending/Anchor.toml
[toolchain] [features] resolution = true skip-lint = false [programs.localnet] lending = "CdZeD33fXsAHfZYS8jdxg4qHgXYJwBQ1Bv6GJyETtLST" [registry] url = "https://api.apr.dev" [provider] cluster = "Localnet" wallet = "~/.config/solana/id.json" [scripts] test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/...
0