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 directory | Source files |
|---|---|
components | 26 |
app | 20 |
lib | 7 |
config | 6 |
(root) | 3 |
types | 2 |
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.
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]),- Line 65
sendTransaction = async (txnBody: any): Promise<Uint8Array | string> => {: Submits the signed transaction to the cluster. - 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.
| Directory | Command | Runs |
|---|---|---|
. | npm run dev | next dev --turbo |
. | npm run start | next start |
. | npm run build | next build |
. | npm run lint | eslint . --ext .ts,.tsx -c .eslintrc.json --fix |
What you could build from it
- Fork the SuperStack copy and extend it within the Other gaps listed on the idea page.
- Learn the pattern first: Program Derived Addresses (PDAs)
- Learn the pattern first: Cross-Program Invocations (CPIs)