Skip to content

iskysun96/orakle-coding-assignment-2024

ย 
ย 

Repository files navigation

๐ŸŽ“ ์นด์ด์ŠคํŠธ ์˜ค๋ผํด X ์•Œ๊ณ ๋žœ๋“œ ๊ฐœ๋ฐœ์ž ์„ธ์…˜ 06/01/24

๐Ÿšฉ ํŒŒ์ด์ฌ์œผ๋กœ NFT Marketplace ์Šค๋งˆํŠธ ๊ณ„์•ฝ์„ ์ž‘์„ฑํ•˜๊ณ  React ์•ฑ๊ณผ ์—ฐ๋™ํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ๋ฐฐ์›Œ๋ณด์ž!

๐Ÿšงโœ‹ ์ž ๊น! ์˜ค๋Š˜ ์ฝ”๋”ฉ ๊ณผ์ œ๋ฅผ ์„ฑ๊ณต์ ์œผ๋กœ ๋๋‚ด๊ธฐ ์œ„ํ•ด ๊ผญ!! ์•„๋ž˜ ์„ค๋ช…์„ ์ฐจ๋ก€๋Œ€๋กœ ๋‹ค ์ฝ๊ณ  ์ง„ํ–‰ํ•ด์ฃผ์„ธ์š”!!!

์นด์ด์ŠคํŠธ ์˜ค๋ผํด X ์•Œ๊ณ ๋žœ๋“œ ๊ฐœ๋ฐœ์ž ์„ธ์…˜์— ์˜ค์‹  ์—ฌ๋Ÿฌ๋ถ„ ๋ฐ˜๊ฐ‘์Šต๋‹ˆ๋‹ค~!

์ด ์ฝ”๋”ฉ๊ณผ์ œ์—์„œ ์—ฌ๋Ÿฌ๋ถ„์€ ์•Œ๊ณ ๋žœ๋“œ ํŒŒ์ด์ฌ์œผ๋กœ NFT ๋งˆ์ผ“ํ”Œ๋ ˆ์ด์Šค ์Šค๋งˆํŠธ ๊ณ„์•ฝ์„ ์ง์ ‘ ๊ตฌํ˜„ํ•˜๊ณ  AlgoKit Utils TypeScript์™€ Application Client๋ฅผ ์‚ฌ์šฉํ•ด ์Šค๋งˆํŠธ๊ณ„์•ฝ์„ ๋ฐฐํฌ ๋ฐ ํ˜ธ์ถœํ•˜๋Š” React ํ”„๋ก ํŠธ์•ค๋“œ ์—ฐ๋™์„ ๊ตฌ์ถ•ํ•ด๋ณผ ๊ฒƒ ์ž…๋‹ˆ๋‹ค.

์ด Algokit ํ”„๋กœ์ ํŠธ๋Š” 2๊ฐœ์˜ ํ”„๋กœ์ ํŠธ ํด๋”๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.

  1. orakle-nft-marketplace-app-contracts: ์•Œ๊ณ ํ‚ท smart contract ํƒฌํ”Œ๋ฆฟ์œผ๋กœ ๋งŒ๋“ค์–ด์ง„ NFT ๋งˆ์ผ“ํ”Œ๋ ˆ์ด์Šค ์Šค๋งˆํŠธ๊ณ„์•ฝ์ด ๋“ค์–ด์žˆ๋Š” ํ”„๋กœ์ ํŠธ.
  2. orakle-nft-marketplace-app-frontend: ์•Œ๊ณ ํ‚ท frontend ํ…œํ”Œ๋ฆฟ์œผ๋กœ ๋งŒ๋“ค์–ด์ง„ React ํ”„๋กœ์ ํŠธ.

์ฝ”๋”ฉ ๊ณผ์ œ๋Š” ์ด 9๋ฌธ์ œ ๋กœ ๊ตฌ์„ฑ์ด ๋˜์–ด ์žˆ์œผ๋ฉฐ, ๋ฌธ์ œ๋“ค์€ ์—ฌ๋Ÿฌ ํŒŒ์ผ๋“ค์— ๋ถ„ํฌ๋˜์–ด์žˆ์œผ๋‹ˆ ๋ฐ‘์— ์ฒดํฌํฌ์ธํŠธ 3 ์„ค๋ช…์„ ๊ผผ๊ผผํžˆ ์ฝ๊ณ  ์ง„ํ–‰ํ•ด์ฃผ์„ธ์š”!

๊ฐœ๋ฐœ์ž ๋ฆฌ์†Œ์Šค:

์ฒดํฌํฌ์ธํŠธ 1: ๐Ÿงฐ ์•Œ๊ณ ๋žœ๋“œ ๊ฐœ๋ฐœ์— ํ•„์š”ํ•œ ํˆดํ‚ท ์„ค์น˜

  1. AlgoKit ์„ค์น˜.
  2. Docker ์„ค์น˜. It is used to run a local Algorand network for development.
  3. Python 3.12 ์ด์ƒ ์„ค์น˜
  4. Node.JS / npm ์„ค์น˜

์ฒดํฌํฌ์ธํŠธ 2: ๐Ÿ’ป ๊ฐœ๋ฐœ ํ™˜๊ฒฝ ์…‹์—…

  1. ์ด ๋ฆฌํฌ๋ฅผ fork ํ•ด์ฃผ์„ธ์š”.
  2. Forkํ•œ ๋ฆฌํฌ๋ฅผ git clone ํ•ด์ฃผ์„ธ์š”.
  3. VSCode์—์„œ ์ด ํด๋”๋ฅผ ์—ด๋žŒํ•ด์ฃผ์„ธ์š”.
  4. ์—ด๋žŒ ํ›„ orakle-nft-marketplace-app.code-workspace ํŒŒ์ผ์„ ์—ด๊ณ  ํ›„ open workspace ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ workspace ๋ชจ๋“œ๋ฅผ ์‹คํ–‰์‹œ์ผœ์ฃผ์„ธ์š”.
  5. ์ด์ œ VSCode ํ„ฐ๋ฏธ๋„์ด 3๊ฐœ๊ฐ€ ์ž๋™ ์ƒ์„ฑ๋  ๊ฒƒ ์ž…๋‹ˆ๋‹ค:
  • ROOT
  • orakle-nft-marketplace-app-contracts
  • orakle-nft-marketplace-app-frontend

์ด ์ค‘ ROOT VSCode ํ„ฐ๋ฏธ๋„์—์„œ algokit project bootstrap all ์ปค๋งจ๋“œ๋ฅผ ์‹คํ–‰์‹œ์ผœ dependencies๋“ค์„ ์„ค์น˜ํ•ด์ฃผ์„ธ์š”. ์ด๋Ÿฌ๋ฉด ๋ชจ๋“  ํ”„๋กœ์ ํŠธ ํด๋”์˜ dependencies๋“ค์ด ์„ค์น˜๋ฉ๋‹ˆ๋‹ค.

๋งŒ์•ฝ 3๊ฐœ์˜ ํ„ฐ๋ฏธ๋„์ด ์ž๋™์œผ๋กœ ์—ด๋ฆฌ์ง€ ์•Š์œผ๋ฉด ์ƒˆ๋กœ์šด ํ„ฐ๋ฏธ๋„์„ + ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ ๋งŒ๋“ค๊ณ  ROOT๋ฅผ ์„ ํƒํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

algokit project bootstrap all

๋งŒ์•ฝ Unhandled PermissionError: [Errno 13] Permission denied: '/Users/$name/.config/algokit' ์—๋Ÿฌ๊ฐ€ ๋œฌ๋‹ค๋ฉด ์•ž์— sudo๋ฅผ ๋ถ™์—ฌ์„œ sudo algokit project bootstrap all ์ปค๋งจ๋“œ๋ฅผ ์‹คํ–‰ํ•˜์„ธ์š”!

  1. ์ด์ œ orakle-nft-marketplace-app-contracts ํ„ฐ๋ฏธ๋„์„ ์„ ํƒํ•œ ๋’ค poetry shell ์ปค๋งจ๋“œ๋ฅผ ์‹คํ–‰ํ•ด ํŒŒ์ด์ฌ virtual environment๋ฅผ ํ™œ์„ฑํ™” ์‹œ์ผœ์ฃผ์„ธ์š”.
    1. ํŒŒ์ด์ฌ virtual environment๋ฅผ ๋น„ํ™œ์„ฑํ™” ์‹œํ‚ฌ๋•Œ๋Š” exit ์ปค๋งจ๋“œ๋ฅผ ์‹คํ–‰ํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.
    2. venv๋ฅผ ํ™œ์„ฑํ™” ํ•œ ๋’ค pip list๋ฅผ ์‹คํ–‰ํ•ด์„œ algorand-python ๋ฐ ์—ฌ๋Ÿฌ dependencies๋“ค์ด ๋‚˜์˜ค๋ฉด ์„ฑ๊ณต์ ์œผ๋กœ ๊ฐ€์ƒํ™˜๊ฒฝ์„ ํ™œ์„ฑํ™” ์‹œํ‚จ๊ฒ๋‹ˆ๋‹ค.

๐ŸŽ‰ ์ด์ œ ๋ชจ๋“  ์ค€๋น„๊ฐ€ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค! Good luck coding! ๐Ÿ’ป

๋ฆฌํฌ fork, clone ํŠœํ† ๋ฆฌ์–ผ: https://github.com/algorand-fix-the-bug-campaign/challenge-1/assets/52557585/acde8053-a8dd-4f53-8bad-45de1068bfda

์ฒดํฌํฌ์ธํŠธ 3: ๐Ÿ“ ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜์„ธ์š”!

์ด ์ฝ”๋”ฉ ๊ณผ์ œ๋Š” ์ด 9๋ฌธ์ œ๋กœ ๊ตฌ์„ฑ๋˜์–ด ์žˆ์œผ๋ฉด

  • 1-4๋ฌธ์ œ๋Š” ์Šค๋งˆํŠธ๊ณ„์•ฝ ๋ฌธ์ œ
  • 5-9๋ฌธ์ œ๋Š” ํ”„๋ก ํŠธ์•ค๋“œ ์—ฐ๋™ ๊ด€๋ จ ๋ฌธ์ œ์ž…๋‹ˆ๋‹ค. ์•„๋ž˜ ์„ค๋ช…์„ ์ฐจ๋ก€๋Œ€๋กœ ์ฝ๊ณ  ์ง„ํ–‰ํ•ด์ฃผ์„ธ์š”!

๋กœ์ปฌ ๋„คํŠธ์›Œํฌ ์‹คํ–‰

  1. ๋„์ปค ๋ฐ์Šคํฌํƒ‘์„ ์‹คํ–‰ํ•œ ๋’ค ํ„ฐ๋ฏธ๋„์—์„œ algokit localnet start ์ปค๋งจ๋“œ๋กœ ๋กœ์ปฌ ๋„คํŠธ์›Œํฌ๋ฅผ ์‹คํ–‰์‹œ์ผœ์ฃผ์„ธ์š”.๋” ์ž์„ธํžˆ ์•Œ๊ณ  ์‹ถ๋‹ค๋ฉด ์—ฌ๊ธฐ๋ฅผ ํด๋ฆญํ•ด์ฃผ์„ธ์š”!. ์˜ค๋Š˜ ๋ชจ๋“  ์ฝ”๋“œ๋Š” ๋กœ์ปฌ ๋„คํŠธ์›Œํฌ์—์„œ ์‹คํ–‰๋ฉ๋‹ˆ๋‹ค.

๋งŒ์•ฝ ๋กœ์ปฌ ๋„คํŠธ์›Œํฌ ์—ฐ๊ฒฐ์ด ์•ˆ๋˜๊ฑฐ๋‚˜ ๋ญ”๊ฐ€ ๋ฌธ์ œ๊ฐ€ ์ƒ๊ธฐ๋ฉด algokit localnet reset ์ปค๋งจ๋“œ๋กœ ๋‹ค์‹œ ๋กœ์ปฌ๋„คํŠธ์›Œํฌ๋ฅผ ์ง€์šฐ๊ณ  ๋‹ค์‹œ ์ƒ์„ฑํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

1-4๋ฌธ์ œ: ์Šค๋งˆํŠธ๊ณ„์•ฝ ๋ฌธ์ œ ์ง„ํ–‰ ์„ค๋ช…

  1. orakle-nft-marketplace-app-contracts ํ„ฐ๋ฏธ๋„์—์„œ poetry shell๋ฅผ ์‹คํ–‰ํ•ด์„œ ํŒŒ์ด์ฌ ๊ฐ€์ƒํ™˜๊ฒฝ์„ ์ผฐ๋Š”์ง€ ํ™•์ธํ•˜์„ธ์š”.
  2. orakle-nft-marketplace-app-contracts/smart_contract/nft_marketplace/contract.py๋กœ ๊ฐ€์‹œ๋ฉด ๋ฌธ์ œ 1-4๊ฐ€ ์ฃผ์„์œผ๋กœ ์ž‘์„ฑ๋˜์–ด์žˆ์Šต๋‹ˆ๋‹ค. ์„ค๋ช…์„ ์ž์„ธํžˆ ์ฝ๊ณ  ๋ฌธ์ œ๋“ค์„ ํ•ด๊ฒฐํ•˜์„ธ์š”!
  3. ๋ฌธ์ œ๋ฅผ ๋‹ค ํ•ด๊ฒฐํ•œ ๋’ค ํ„ฐ๋ฏธ๋„์—์„œ algokit project run build ์ปค๋งจ๋“œ๋ฅผ ์‹คํ–‰ํ•ด ์Šค๋งˆํŠธ ๊ณ„์•ฝ์„ ์ปดํŒŒ์ผ ํ•˜์‹œ๊ณ  algokit project deploy localnet ์ปค๋งจ๋“œ๋ฅผ ์‹คํ–‰ํ•ด smart_contracts/digital_marketplace/deploy-config.ts ํŒŒ์ผ์„ ์‹คํ–‰ํ•˜์„ธ์š”!
algokit project run build
algokit project deploy localnet

๐Ÿšง ์ฃผ๋ชฉ!! algokit project deploy localnet ์ž‘๋™ ๋„์ค‘ ์—๋Ÿฌ๊ฐ€ ๋‚˜์„œ ์Šค๋งˆํŠธ๊ณ„์•ฝ์„ ๊ณ ์น˜์…จ๋‹ค๋ฉด ๋‹ค์‹œ algokit project run build๋ฅผ ํ•ด์„œ ์Šค๋งˆํŠธ๊ณ„์•ฝ์„ ์žฌ compile ํ•œ ํ›„ deploy ์ปค๋ฉ˜๋“œ๋ฅผ ์‹คํ–‰ํ•ด์ฃผ์…”์•ผ ํ•ฉ๋‹ˆ๋‹ค!

์‹คํ–‰ ํ›„ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์ฝ˜์†” ๊ฐ’์ด ์ถœ๋ ฅ๋˜๋ฉด ์„ฑ๊ณต์ ์œผ๋กœ ๋ชจ๋“  ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜์‹ ๊ฒ๋‹ˆ๋‹ค! ๐Ÿ‘๐Ÿ‘

๊ณผ์ œ ์ œ์ถœ์„ ์œ„ํ•ด ์Šคํฌ๋ฆฐ์ƒท ์ฐ์–ด์ฃผ์„ธ์š”. ์ด์ œ ๋ฌธ์ œ 5-9๋กœ ๋„˜์–ด๊ฐ€์„ธ์š”. image

5-9๋ฌธ์ œ: ํ”„๋ก ํŠธ์•ค๋“œ ์—ฐ๋™ ๋ฌธ์ œ ์ง„ํ–‰ ์„ค๋ช…

  1. orakle-nft-marketplace-app-contracts ํ„ฐ๋ฏธ๋„์—์„œ algokit project deploy localnet๋ฅผ ์‹คํ–‰ํ•ด ๋‚˜์˜จ ์ฝ˜์†”๊ฐ’์—์„œ ์•„๋ž˜ ๊ทธ๋ฆผ์— ๋นจ๊ฐ„ ๋ฐ•์Šค ์•ˆ์— ์žˆ๋Š” NftMarketplaceList์˜ app ID ๋ฒˆํ˜ธ๋ฅผ ๋ณต์‚ฌํ•ด์„œ src/utils/marketplaceListAppId.ts์— marketplaceListAppId ๋ณ€์ˆ˜๊ฐ’์œผ๋กœ ๋„ฃ์–ด์ฃผ์„ธ์š”.

๐Ÿšง ์ฃผ๋ชฉ!! ์—ฌ๊ธฐ์„œ nftMarketplaceList์•ฑ์€ ์—ฌ๋Ÿฌ๋ถ„์ด ๋ฌธ์ œ 1-4์—์„œ ๋งŒ๋“  NftMarketplace ์•ฑ๊ณผ ๋‹ค๋ฅธ ์•ฑ์ž…๋‹ˆ๋‹ค. ํ”„๋ก ํŠธ์•ค๋“œ ์ž‘๋™์„ ์œ„ํ•ด ์ถ”๊ฐ€์ ์œผ๋กœ ๋งŒ๋“ค์–ด์ง„ ์•ฑ์ด๋‹ˆ ์ด ๋‹จ๊ณ„ ์™ธ ์‚ฌ์šฉํ•˜์‹ค ์ผ์€ ์—†์Šต๋‹ˆ๋‹ค.

Screenshot 2024-05-28 at 9 08 36โ€ฏPM
  1. orakle-nft-marketplace-app-frontend ํ„ฐ๋ฏธ๋„๋กœ ๊ฐ€์„œ npm run dev๋ฅผ ์‹คํ–‰ํ•ด ๋กœ์ปฌ ์„œ๋ฒ„๋ฅผ ์‹คํ–‰ํ•˜๊ณ , ๋ธŒ๋ผ์šฐ์ €์— ํŽ˜์ด์ง€๋ฅผ ์—ด๊ณ  ์ง„ํ–‰ํ•ด์ฃผ์„ธ์š”! npm run dev ์‹คํ–‰์‹œ ํ”„๋ก ํŠธ์—์„œ ์‚ฌ์šฉํ•  ์•ฑ ํด๋ผ์ด์–ธํŠธ ํŒŒ์ผ์ด src/contracts์— ์ž๋™ ์ƒ์„ฑ๋˜๋‹ˆ ๊ผญ ๋จผ์ € ์‹คํ–‰ํ•œ ํ•œ ํ›„ ์ง„ํ–‰ํ•ด์ฃผ์„ธ์š”!

  2. ๋ฌธ์ œ 5์€ src/utils/getCurrentNftmClient.ts ํŒŒ์ผ์— ์žˆ์Šต๋‹ˆ๋‹ค! ํŒŒ์ผ์— ๋ฌธ์ œ๊ฐ€ ์ ํ˜€์žˆ์Šต๋‹ˆ๋‹ค.

  3. ๋ฌธ์ œ 6-9๋Š” src/methods.ts ํŒŒ์ผ์— ์žˆ์Šต๋‹ˆ๋‹ค! ํŒŒ์ผ์— ๋ฌธ์ œ๋“ค์ด ์ ํ˜€์žˆ์Šต๋‹ˆ๋‹ค.

  4. ๋ฌธ์ œ๋“ค๋ฅผ ๋‹ค ํ•ด๊ฒฐํ•œ ๋’ค ์•„๋ž˜ ์„ค๋ช…๋Œ€๋กœ ์ง์ ‘ ์›น์‚ฌ์ดํŠธ์— ๊ฐ€์„œ ์‹คํ–‰ํ•ด๋ณด์„ธ์š”:

๐Ÿšง ์ฃผ๋ชฉ!! ์•„๋ž˜ ๋‹จ๊ณ„๋ฅผ ์‹คํ–‰ ๋„์ค‘ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•  ์‹œ ์œ„์— ๋‹จ๊ณ„1๋ฅผ ๋‹ค์‹œ ์‹คํ–‰ํ•ด Nft Marketplace List ์Šค๋งˆํŠธ๊ณ„์•ฝ์„ ๋กœ์ปฌ ๋„คํŠธ์›Œํฌ์— ์žฌ๋ฐฐํฌ ํ•œ ํ›„ app id ๊ฐ’์„ ๊ต์ฒดํ•œ ๋’ค ์ง„ํ–‰ํ•ด์ฃผ์„ธ์š”!

1. ๋กœ์ปฌ ์ง€๊ฐ‘ ์—ฐ๊ฒฐ

  • Wallet Connection ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ ๋กœ์ปฌ ์ง€๊ฐ‘์„ ์—ฐ๊ฒฐํ•˜์„ธ์š”.

2. ํ…Œ์ŠคํŠธ์šฉ NFT ์ƒ์„ฑ

  • ์œ„์— mint test nft ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ ํ…Œ์ŠคํŠธ์šฉ nft๋ฅผ ๋งŒ๋“œ์„ธ์š”. ์ฝ”๋“œ๊ฐ€ ๊ถ๊ธˆํ•˜์‹œ๋ฉด src/components/MintNft.tsx๋ฅผ ํ™•์ธํ•˜์„ธ์š”. ํ…Œ์ŠคํŠธ์šฉ์ด๊ธฐ์— ๊ณ ์ •์ ์œผ๋กœ ๊ฐ™์€ ์ด๋ฏธ์ง€์— total supply 10๊ฐœ์ธ NFT๋ฅผ ๋งŒ๋“ญ๋‹ˆ๋‹ค. ์„œ๋ช…์ฐฝ์—์„œ ํŒจ์Šค์›Œ๋“œ ๊ธฐ์ž… ์—†์ด ok ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ ์„œ๋ช…ํ•˜์„ธ์š”.

3. ํŒ๋งคํ•  NFT ๋ฆฌ์ŠคํŒ…

  • ์œ„์— sell NFT ๋ฒ„ํŠผ์„ ๋ˆ„๋ฅด๊ณ  Select NFT to Sell์—์„œ 2๋‹จ๊ณ„์—์„œ ๋งŒ๋“  ํ…Œ์ŠคํŠธ NFT๋ฅผ ์„ ํƒ, ๊ฐœ์ˆ˜๋Š” 1๊ฐœ, ๊ฐ€๊ฒฉ์€ 1์•Œ๊ณ ๋กœ ์„ค์ •ํ•œ ๋’ค publish๋ฅผ ๋ˆŒ๋Ÿฌ nft๋ฅผ ๋ฆฌ์ŠคํŒ…ํ•˜์„ธ์š”. ์ด๋•Œ ์„œ๋ช… ์ฐฝ์ด 3๋ฒˆ ๋‚˜์˜ต๋‹ˆ๋‹ค. ์„œ๋ช…์ฐฝ์—์„œ ํŒจ์Šค์›Œ๋“œ ๊ธฐ์ž… ์—†์ด ok ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ ์„œ๋ช…ํ•˜์„ธ์š”.
  • ๋ฆฌ์ŠคํŒ… ํ›„ ๊ณผ์ œ ์ œ์ถœ์„ ์œ„ํ•ด ํŒ๋งค NFT ๋“ฑ๋ก์ด ๋ณด์ด๋„๋ก ์Šคํฌ๋ฆฐ์ƒท์„ ์ฐ์–ด์ฃผ์„ธ์š”!
image

4. NFT ๊ตฌ๋งค

  • Buy now ๋ฒ„ํŠผ์„ ๋ˆ„๋ฅด๊ณ  Buy Amount๋ฅผ 1๊ฐœ๋กœ ์„ค์ •ํ•œ ๋’ค Buy NFT!๋ฅผ ๋ˆŒ๋Ÿฌ ๊ตฌ๋งคํ•˜์„ธ์š”. ์„œ๋ช… ์ฐฝ 1๋ฒˆ ๋‚˜์˜ต๋‹ˆ๋‹ค.

5. ์ˆ˜์ต๊ธˆ ํšŒ์ˆ˜ ๋ฐ ์Šค๋งˆํŠธ๊ณ„์•ฝ ์‚ญ์ œ

  • Withdraw Profit ๋ฒ„ํŠผ์„ ๋ˆ„๋ฅด๊ณ  Withdraw all profits ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ ์ˆ˜์ต๊ธˆ์„ ํšŒ์ˆ˜ํ•˜๊ณ  ์Šค๋งˆํŠธ๊ณ„์•ฝ์„ ์‚ญ์ œํ•˜์„ธ์š”. ์„œ๋ช… ์ฐฝ์€ 2๋ฒˆ ๋‚˜์˜ต๋‹ˆ๋‹ค.

์ด ๋ชจ๋“  ๊ฒƒ์ด ์—๋Ÿฌ์—†์ด ์ œ๋Œ€๋กœ ์‹คํ–‰๋˜๋ฉด ์„ฑ๊ณต์ ์œผ๋กœ ๊ณผ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜์‹ ๊ฒ๋‹ˆ๋‹ค! ๐ŸŽ‰๐ŸŽ‰ ์ด์ œ๋ถ€ํ„ด ์ž์œ ๋กญ๊ฒŒ ์ง์ ‘ ๋งŒ๋“  ๋””์ง€ํ„ธ ๋งˆ์ผ“ํ”Œ๋ ˆ์ด์Šค ์•ฑ์„ ์‚ฌ์šฉํ•ด๋ณด์„ธ์š”~!

์ฒดํฌํฌ์ธํŠธ 4: ๐Ÿ’ฏ ๊ณผ์ œ ์ œ์ถœํ•˜๋Š” ๋ฐฉ๋ฒ•

  1. ์„ฑ๊ณต์ ์œผ๋กœ ๋ชจ๋“  ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜์…จ๋‹ค๋ฉด ๋ณธ์ธ์ด forkํ•œ ๊นƒํ—™ ๋ฆฌํฌ๋กœ ์ฝ”๋“œ๋ฅผ ํ‘ธ์‰ฌํ•ด์ฃผ์„ธ์š”. ๊ทธ๋Ÿฐ ๋‹ค์Œ ์›๋ž˜์˜ ๋ฆฌํฌ๋กœ Pull request๋ฅผ ํ•ด์ฃผ์„ธ์š”.
  2. Pull Request ํ…œํ”Œ๋ ›์„ ๋”ฐ๋ผ PR๋ฅผ ๋งŒ๋“ค์–ด ์ œ์ถœํ•ด์ฃผ์„ธ์š”!

์ฒซ๋ฒˆ์งธ ์•Œ๊ณ ๋žœ๋“œ ํ’€์Šคํ… ๋””์•ฑ์„ ํŒŒ์ด์ฌ๊ณผ ์•Œ๊ณ ํ‚ท์œผ๋กœ ๋งŒ๋“œ์‹  ๊ฒƒ์„ ์ถ•ํ•˜๋“œ๋ฆฝ๋‹ˆ๋‹ค! ๐ŸŽ‰๐ŸŽ‰

orakle-nft-marketplace-app (default algokit readme)

This starter full stack project has been generated using AlgoKit. See below for default getting started instructions.

Setup

Initial setup

  1. Clone this repository to your local machine.
  2. Ensure Docker is installed and operational. Then, install AlgoKit following this guide.
  3. Run algokit project bootstrap all in the project directory. This command sets up your environment by installing necessary dependencies, setting up a Python virtual environment, and preparing your .env file.
  4. To build your project, execute algokit project run build. This compiles your project and prepares it for running.
  5. For project-specific instructions, refer to the READMEs of the child projects:

This project is structured as a monorepo, refer to the documentation to learn more about custom command orchestration via algokit project run.

Subsequently

  1. If you update to the latest source code and there are new dependencies, you will need to run algokit project bootstrap all again.
  2. Follow step 3 above.

Continuous Integration / Continuous Deployment (CI/CD)

This project uses GitHub Actions to define CI/CD workflows, which are located in the .github/workflows folder. You can configure these actions to suit your project's needs, including CI checks, audits, linting, type checking, testing, and deployments to TestNet.

For pushes to main branch, after the above checks pass, the following deployment actions are performed:

  • The smart contract(s) are deployed to TestNet using AlgoNode.
  • The frontend application is deployed to a provider of your choice (Netlify, Vercel, etc.). See frontend README for more information.

Please note deployment of smart contracts is done via algokit deploy command which can be invoked both via CI as seen on this project, or locally. For more information on how to use algokit deploy please see AlgoKit documentation.

Tools

This project makes use of Python and React to build Algorand smart contracts and to provide a base project configuration to develop frontends for your Algorand dApps and interactions with smart contracts. The following tools are in use:

  • Algorand, AlgoKit, and AlgoKit Utils
  • Python dependencies including Poetry, Black, Ruff or Flake8, mypy, pytest, and pip-audit
  • React and related dependencies including AlgoKit Utils, Tailwind CSS, daisyUI, use-wallet, npm, jest, playwright, Prettier, ESLint, and Github Actions workflows for build validation

VS Code

It has also been configured to have a productive dev experience out of the box in VS Code, see the backend .vscode and frontend .vscode folders for more details.

Integrating with smart contracts and application clients

Refer to the orakle-nft-marketplace-app-contracts folder for overview of working with smart contracts, projects/orakle-nft-marketplace-app-frontend for overview of the React project and the projects/orakle-nft-marketplace-app-frontend/contracts folder for README on adding new smart contracts from backend as application clients on your frontend. The templates provided in these folders will help you get started. When you compile and generate smart contract artifacts, your frontend component will automatically generate typescript application clients from smart contract artifacts and move them to frontend/src/contracts folder, see generate:app-clients in package.json. Afterwards, you are free to import and use them in your frontend application.

The frontend starter also provides an example of interactions with your NftMarketplaceClient in AppCalls.tsx component by default.

Next Steps

You can take this project and customize it to build your own decentralized applications on Algorand. Make sure to understand how to use AlgoKit and how to write smart contracts for Algorand before you start.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 90.5%
  • Python 7.6%
  • Jinja 1.1%
  • Other 0.8%