Sol.College

Full lesson

bidcoin-app-mock

What it does

From the project README:

Bidcoin is a decentralized online penny auction platform that integrates blockchain technology to enhance transparency, trust, and security. It enables users to bid on a wide variety of products such as digital assets, cryptocurrency, luxury items, and more. Key features include automated bidding with BidBot, real-time tracking, and smart contract-based auction processes to ensure fairness. The platform also supports cryptocurrency payments and offers a seamless, gamified auction experience​​​.
Original
muratyayla26/bidcoin-app-mock
SuperStack fork
Blockchains/bidcoin-app-mock @ 638bc13
Stars
0
Last push (original)
2024-10-08
Languages
TypeScript, JavaScript, CSS
Detected stack
Next.jsweb3.js
Categories
Other
Licence
MIT
Homepage
https://bidcoin-app-mock.vercel.app

Architecture

64 source files. By extension: .tsx ×44, .ts ×17, .js ×3.

Top-level directorySource files
components26
app20
lib7
config6
(root)3
types2

Dapp: deploying

This fork is queued for its own live dapp on Sol.College, with a Devnet/Mainnet switch. It appears here, at /dapps/bidcoin-app-mock/, once it is deployed and checked on devnet. Until then, run it locally with the commands below.

Key code, explained

Excerpts chosen automatically where the code uses the most Solana concepts, pinned to the fork's commit.

muratyayla26/bidcoin-app-mock · lib/solanaRPC.ts L61–84 @ 638bc13 · MIT · original
      return error as string;    }  };   sendTransaction = async (txnBody: any): Promise<Uint8Array | string> => {    try {      const solanaWallet = new SolanaWallet(this.provider);       const accounts = await solanaWallet.requestAccounts();       const connectionConfig = await solanaWallet.request<        string[],        CustomChainConfig      >({        method: "solana_provider_config",        params: [],      });      const connection = new Connection(connectionConfig.rpcTarget);       const block = await connection.getLatestBlockhash("finalized");       // const TransactionInstruction = SystemProgram.transfer({      //   fromPubkey: new PublicKey(accounts[0]),      //   toPubkey: new PublicKey(accounts[0]),
  1. Line 65 sendTransaction = async (txnBody: any): Promise<Uint8Array | string> => {: Submits the signed transaction to the cluster.
  2. Line 80 const block = await connection.getLatestBlockhash("finalized");: Fetches a recent blockhash. Transactions expire if it gets too old.

How to run, build and test

These commands come from the repo's own manifests (package.json scripts, Anchor.toml, Cargo, go.mod, Makefile). Check the README for prerequisites and environment variables.

DirectoryCommandRuns
.npm run devnext dev --turbo
.npm run startnext start
.npm run buildnext build
.npm run linteslint . --ext .ts,.tsx -c .eslintrc.json --fix

What you could build from it