์ฝ˜ํ…์ธ  ๋Œ€ํ‘œ ์ด๋ฏธ์ง€ - ๐Ÿš€ ๋ผ๋ผ๋ฒจ๊ณผ web3.js๋กœ ๋ธ”๋ก์ฒด์ธ CMS ํ†ตํ•ฉํ•˜๊ธฐ

๐Ÿš€ ๋ผ๋ผ๋ฒจ๊ณผ web3.js๋กœ ๋ธ”๋ก์ฒด์ธ CMS ํ†ตํ•ฉํ•˜๊ธฐ

์ „ํ†ต์ ์ธ ์›น๊ณผ ํƒˆ์ค‘์•™ํ™” ์„ธ๊ณ„๋ฅผ ์—ฐ๊ฒฐํ•˜๋Š” ์‹ค์ „ ๊ฐ€์ด๋“œ

์•ˆ๋…•! ์˜ค๋Š˜์€ ์ •๋ง ํฅ๋ฏธ๋กœ์šด ์ฃผ์ œ๋ฅผ ๊ฐ€์ง€๊ณ  ์™”์–ด. ๋ฐ”๋กœ ๋ผ๋ผ๋ฒจ(Laravel)์ด๋ผ๋Š” PHP ํ”„๋ ˆ์ž„์›Œํฌ์™€ web3.js๋ฅผ ๊ฒฐํ•ฉํ•ด์„œ ๋ธ”๋ก์ฒด์ธ ๊ธฐ๋Šฅ์„ ๊ฐ€์ง„ CMS(์ฝ˜ํ…์ธ  ๊ด€๋ฆฌ ์‹œ์Šคํ…œ)๋ฅผ ๋งŒ๋“œ๋Š” ๋ฐฉ๋ฒ•์ด์•ผ. ๐ŸŽฏ

"์™œ ๊ตณ์ด ์ „ํ†ต์ ์ธ ์›น ํ”„๋ ˆ์ž„์›Œํฌ์— ๋ธ”๋ก์ฒด์ธ์„ ๋ถ™์—ฌ?" ๋ผ๊ณ  ์ƒ๊ฐํ•  ์ˆ˜๋„ ์žˆ๋Š”๋ฐ, ์‹ค์ œ๋กœ ์ด ์กฐํ•ฉ์€ ์—„์ฒญ๋‚œ ์‹œ๋„ˆ์ง€๋ฅผ ๋งŒ๋“ค์–ด๋‚ด. ๋ผ๋ผ๋ฒจ์˜ ๊ฐ•๋ ฅํ•œ ๋ฐฑ์—”๋“œ ๊ธฐ๋Šฅ๊ณผ ๋ธ”๋ก์ฒด์ธ์˜ ํˆฌ๋ช…์„ฑ, ๋ถˆ๋ณ€์„ฑ์„ ๊ฒฐํ•ฉํ•˜๋ฉด ์™„์ „ํžˆ ์ƒˆ๋กœ์šด ์ฐจ์›์˜ ์ฝ˜ํ…์ธ  ๊ด€๋ฆฌ ์‹œ์Šคํ…œ์„ ๊ตฌ์ถ•ํ•  ์ˆ˜ ์žˆ๊ฑฐ๋“ ! ๐Ÿ’ก

Laravel PHP Framework Web3.js Blockchain Library Integration API Bridge

๐ŸŽช ์™œ ๋ผ๋ผ๋ฒจ๊ณผ web3.js๋ฅผ ํ•จ๊ป˜ ์‚ฌ์šฉํ• ๊นŒ?

๋จผ์ € ์ด ๋‘ ๊ธฐ์ˆ ์„ ์™œ ํ•จ๊ป˜ ์‚ฌ์šฉํ•˜๋Š”์ง€๋ถ€ํ„ฐ ์ดํ•ดํ•ด๋ณด์ž. ๊ฐ๊ฐ์˜ ๊ฐ•์ ์„ ์‚ดํŽด๋ณด๋ฉด ๋‹ต์ด ๋ณด์—ฌ!

๐Ÿ”ฅ ๋ผ๋ผ๋ฒจ์˜ ๊ฐ•์ 

๋ผ๋ผ๋ฒจ์€ PHP ์ƒํƒœ๊ณ„์—์„œ ๊ฐ€์žฅ ์ธ๊ธฐ ์žˆ๋Š” ํ”„๋ ˆ์ž„์›Œํฌ ์ค‘ ํ•˜๋‚˜์•ผ. Eloquent ORM์œผ๋กœ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์ž‘์—…์ด ์ •๋ง ์‰ฝ๊ณ , ๋ผ์šฐํŒ…, ๋ฏธ๋“ค์›จ์–ด, ์ธ์ฆ ์‹œ์Šคํ…œ์ด ์ด๋ฏธ ์ž˜ ๊ตฌ์ถ•๋˜์–ด ์žˆ์–ด์„œ ๋น ๋ฅด๊ฒŒ ์›น ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ๋งŒ๋“ค ์ˆ˜ ์žˆ์ง€.

ํŠนํžˆ CMS๋ฅผ ๋งŒ๋“ค ๋•Œ๋Š” ์‚ฌ์šฉ์ž ๊ด€๋ฆฌ, ๊ถŒํ•œ ์ œ์–ด, ํŒŒ์ผ ์—…๋กœ๋“œ, ์บ์‹ฑ ๊ฐ™์€ ๊ธฐ๋Šฅ๋“ค์ด ํ•„์ˆ˜์ธ๋ฐ, ๋ผ๋ผ๋ฒจ์€ ์ด๋Ÿฐ ๊ฒƒ๋“ค์„ ๊ธฐ๋ณธ์œผ๋กœ ์ œ๊ณตํ•ด. ๊ฒŒ๋‹ค๊ฐ€ php artisan ๋ช…๋ น์–ด๋กœ ์ฝ”๋“œ ์ƒ์„ฑ๋„ ์ž๋™ํ™”ํ•  ์ˆ˜ ์žˆ์–ด์„œ ๊ฐœ๋ฐœ ์†๋„๊ฐ€ ์—„์ฒญ ๋นจ๋ผ! โšก

โ›“๏ธ web3.js์˜ ๊ฐ•์ 

web3.js๋Š” ์ด๋”๋ฆฌ์›€ ๋ธ”๋ก์ฒด์ธ๊ณผ ์ƒํ˜ธ์ž‘์šฉํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•ด์ฃผ๋Š” ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์•ผ. ์Šค๋งˆํŠธ ์ปจํŠธ๋ž™ํŠธ๋ฅผ ํ˜ธ์ถœํ•˜๊ณ , ํŠธ๋žœ์žญ์…˜์„ ์ „์†กํ•˜๊ณ , ๋ธ”๋ก์ฒด์ธ ๋ฐ์ดํ„ฐ๋ฅผ ์ฝ์–ด์˜ฌ ์ˆ˜ ์žˆ์–ด.

๋ธ”๋ก์ฒด์ธ์˜ ํ•ต์‹ฌ ๊ฐ€์น˜๋Š” ํƒˆ์ค‘์•™ํ™”์™€ ๋ถˆ๋ณ€์„ฑ์ด์•ผ. ํ•œ๋ฒˆ ๊ธฐ๋ก๋œ ๋ฐ์ดํ„ฐ๋Š” ๋ˆ„๊ตฌ๋„ ์ž„์˜๋กœ ์ˆ˜์ •ํ•  ์ˆ˜ ์—†๊ณ , ๋ชจ๋“  ๊ฑฐ๋ž˜ ๋‚ด์—ญ์ด ํˆฌ๋ช…ํ•˜๊ฒŒ ๊ณต๊ฐœ๋ผ. ์ด๋Ÿฐ ํŠน์„ฑ์„ CMS์— ์ ์šฉํ•˜๋ฉด ์ฝ˜ํ…์ธ ์˜ ์›๋ณธ ์ฆ๋ช…, ์ €์ž‘๊ถŒ ๋ณดํ˜ธ, ํˆฌ๋ช…ํ•œ ์ˆ˜์ต ๋ถ„๋ฐฐ ๊ฐ™์€ ํ˜์‹ ์ ์ธ ๊ธฐ๋Šฅ์„ ๊ตฌํ˜„ํ•  ์ˆ˜ ์žˆ์–ด! ๐ŸŽจ

๐Ÿ—๏ธ ์‹œ์Šคํ…œ ์•„ํ‚คํ…์ฒ˜ ์„ค๊ณ„ํ•˜๊ธฐ

๋ณธ๊ฒฉ์ ์œผ๋กœ ์‹œ์ž‘ํ•˜๊ธฐ ์ „์— ์ „์ฒด ์‹œ์Šคํ…œ ๊ตฌ์กฐ๋ฅผ ์ดํ•ดํ•˜๋Š” ๊ฒŒ ์ค‘์š”ํ•ด. ์šฐ๋ฆฌ๊ฐ€ ๋งŒ๋“ค ๋ธ”๋ก์ฒด์ธ CMS๋Š” ํฌ๊ฒŒ ์„ธ ๊ฐ€์ง€ ๋ ˆ์ด์–ด๋กœ ๊ตฌ์„ฑ๋ผ:

๐Ÿ“Š 1. ํ”„๋ ˆ์  ํ…Œ์ด์…˜ ๋ ˆ์ด์–ด (Frontend)

์‚ฌ์šฉ์ž๊ฐ€ ์ง์ ‘ ๋ณด๊ณ  ์ƒํ˜ธ์ž‘์šฉํ•˜๋Š” ๋ถ€๋ถ„์ด์•ผ. ๋ผ๋ผ๋ฒจ์˜ Blade ํ…œํ”Œ๋ฆฟ ์—”์ง„์„ ์‚ฌ์šฉํ•˜๊ฑฐ๋‚˜, Vue.js๋‚˜ React ๊ฐ™์€ ํ”„๋ก ํŠธ์—”๋“œ ํ”„๋ ˆ์ž„์›Œํฌ๋ฅผ ์—ฐ๋™ํ•  ์ˆ˜ ์žˆ์–ด. ์—ฌ๊ธฐ์„œ web3.js๋ฅผ ์‚ฌ์šฉํ•ด์„œ ๋ฉ”ํƒ€๋งˆ์Šคํฌ ๊ฐ™์€ ์ง€๊ฐ‘๊ณผ ์—ฐ๊ฒฐํ•˜๊ณ , ๋ธ”๋ก์ฒด์ธ ํŠธ๋žœ์žญ์…˜์„ ๋ฐœ์ƒ์‹œ์ผœ.

์ค‘์š”ํ•œ ๊ฑด ์‚ฌ์šฉ์ž ๊ฒฝํ—˜(UX)์ด์•ผ. ๋ธ”๋ก์ฒด์ธ ๊ธฐ์ˆ ์ด ๋ณต์žกํ•˜๋”๋ผ๋„ ์‚ฌ์šฉ์ž๋Š” ๊ฐ„๋‹จํ•˜๊ฒŒ ๋ฒ„ํŠผ ํด๋ฆญ ๋ช‡ ๋ฒˆ์œผ๋กœ ๋ชจ๋“  ๊ฑธ ์ฒ˜๋ฆฌํ•  ์ˆ˜ ์žˆ์–ด์•ผ ํ•ด. ๊ฐ€์Šค๋น„ ์˜ˆ์ƒ, ํŠธ๋žœ์žญ์…˜ ์ƒํƒœ ํ‘œ์‹œ, ์—๋Ÿฌ ํ•ธ๋“ค๋ง ๊ฐ™์€ ๋ถ€๋ถ„์„ ์‹ ๊ฒฝ ์จ์•ผ ํ•ด! ๐ŸŽฏ

โš™๏ธ 2. ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๋ ˆ์ด์–ด (Backend)

๋ผ๋ผ๋ฒจ์ด ๋‹ด๋‹นํ•˜๋Š” ํ•ต์‹ฌ ๋น„์ฆˆ๋‹ˆ์Šค ๋กœ์ง ์˜์—ญ์ด์•ผ. ์‚ฌ์šฉ์ž ์ธ์ฆ, ์ฝ˜ํ…์ธ  CRUD(์ƒ์„ฑ, ์ฝ๊ธฐ, ์ˆ˜์ •, ์‚ญ์ œ), ํŒŒ์ผ ๊ด€๋ฆฌ, API ์—”๋“œํฌ์ธํŠธ ์ œ๊ณต ๋“ฑ์„ ์ฒ˜๋ฆฌํ•ด.

์—ฌ๊ธฐ์„œ ์ค‘์š”ํ•œ ๊ฑด ํ•˜์ด๋ธŒ๋ฆฌ๋“œ ๋ฐ์ดํ„ฐ ๊ด€๋ฆฌ์•ผ. ๋ชจ๋“  ๋ฐ์ดํ„ฐ๋ฅผ ๋ธ”๋ก์ฒด์ธ์— ์ €์žฅํ•˜๋ฉด ๋น„์šฉ์ด ๋„ˆ๋ฌด ๋งŽ์ด ๋“ค์–ด. ๊ทธ๋ž˜์„œ ์ค‘์š”ํ•œ ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ(ํ•ด์‹œ๊ฐ’, ํƒ€์ž„์Šคํƒฌํ”„, ์†Œ์œ ๊ถŒ ์ •๋ณด)๋งŒ ๋ธ”๋ก์ฒด์ธ์— ์ €์žฅํ•˜๊ณ , ์‹ค์ œ ์ฝ˜ํ…์ธ ๋Š” ์ „ํ†ต์ ์ธ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค๋‚˜ IPFS ๊ฐ™์€ ๋ถ„์‚ฐ ์Šคํ† ๋ฆฌ์ง€์— ์ €์žฅํ•˜๋Š” ์ „๋žต์„ ์‚ฌ์šฉํ•ด! ๐Ÿ’พ

๐Ÿ”— 3. ๋ธ”๋ก์ฒด์ธ ๋ ˆ์ด์–ด

์ด๋”๋ฆฌ์›€์ด๋‚˜ ๋‹ค๋ฅธ EVM ํ˜ธํ™˜ ๋ธ”๋ก์ฒด์ธ(ํด๋ฆฌ๊ณค, BSC ๋“ฑ)์— ๋ฐฐํฌ๋œ ์Šค๋งˆํŠธ ์ปจํŠธ๋ž™ํŠธ๊ฐ€ ์—ฌ๊ธฐ์— ์†ํ•ด. ์†”๋ฆฌ๋””ํ‹ฐ(Solidity)๋กœ ์ž‘์„ฑ๋œ ์ปจํŠธ๋ž™ํŠธ๋Š” ์ฝ˜ํ…์ธ  ๋“ฑ๋ก, ์†Œ์œ ๊ถŒ ์ด์ „, ๋ผ์ด์„ ์Šค ๊ด€๋ฆฌ ๊ฐ™์€ ํ•ต์‹ฌ ๋กœ์ง์„ ๋‹ด๋‹นํ•ด.

web3.js๋Š” ์ด ๋ ˆ์ด์–ด์™€ ํ†ต์‹ ํ•˜๋Š” ๋‹ค๋ฆฌ ์—ญํ• ์„ ํ•ด. HTTP Provider๋‚˜ WebSocket Provider๋ฅผ ํ†ตํ•ด ๋ธ”๋ก์ฒด์ธ ๋…ธ๋“œ์— ์—ฐ๊ฒฐํ•˜๊ณ , ์ปจํŠธ๋ž™ํŠธ ๋ฉ”์„œ๋“œ๋ฅผ ํ˜ธ์ถœํ•˜๊ฑฐ๋‚˜ ์ด๋ฒคํŠธ๋ฅผ ๊ตฌ๋…ํ•  ์ˆ˜ ์žˆ์–ด! ๐ŸŒ‰

๐Ÿ› ๏ธ ๊ฐœ๋ฐœ ํ™˜๊ฒฝ ์„ธํŒ…ํ•˜๊ธฐ

์ž, ์ด์ œ ์‹ค์ œ๋กœ ์†์„ ๋”๋Ÿฝํ˜€๋ณผ ์‹œ๊ฐ„์ด์•ผ! ๋จผ์ € ๊ฐœ๋ฐœ ํ™˜๊ฒฝ์„ ๊ตฌ์ถ•ํ•ด๋ณด์ž.

๐Ÿ“ฆ ํ•„์ˆ˜ ๋„๊ตฌ ์„ค์น˜

๋‹ค์Œ ๋„๊ตฌ๋“ค์ด ํ•„์š”ํ•ด:

๋„๊ตฌ ์šฉ๋„ ๋ฒ„์ „
PHP ๋ผ๋ผ๋ฒจ ์‹คํ–‰ ํ™˜๊ฒฝ 8.1 ์ด์ƒ
Composer PHP ํŒจํ‚ค์ง€ ๊ด€๋ฆฌ์ž ์ตœ์‹  ๋ฒ„์ „
Node.js npm ๋ฐ web3.js ์‹คํ–‰ 16.x ์ด์ƒ
MySQL/PostgreSQL ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค 8.0 / 13 ์ด์ƒ
Ganache ๋กœ์ปฌ ๋ธ”๋ก์ฒด์ธ ํ…Œ์ŠคํŠธ ์ตœ์‹  ๋ฒ„์ „

๐Ÿš€ ๋ผ๋ผ๋ฒจ ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ

ํ„ฐ๋ฏธ๋„์„ ์—ด๊ณ  ๋‹ค์Œ ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•ด:

composer create-project laravel/laravel blockchain-cms
cd blockchain-cms
php artisan serve

์ด์ œ http://localhost:8000์— ์ ‘์†ํ•˜๋ฉด ๋ผ๋ผ๋ฒจ ํ™˜์˜ ํŽ˜์ด์ง€๊ฐ€ ๋ณด์ผ ๊ฑฐ์•ผ! ๐ŸŽ‰

๐Ÿ“š web3.js ์„ค์น˜

ํ”„๋กœ์ ํŠธ ๋ฃจํŠธ ๋””๋ ‰ํ† ๋ฆฌ์—์„œ npm์„ ์ดˆ๊ธฐํ™”ํ•˜๊ณ  web3.js๋ฅผ ์„ค์น˜ํ•ด:

npm init -y
npm install web3
npm install @truffle/contract

@truffle/contract๋Š” ์Šค๋งˆํŠธ ์ปจํŠธ๋ž™ํŠธ์™€์˜ ์ƒํ˜ธ์ž‘์šฉ์„ ๋” ์‰ฝ๊ฒŒ ๋งŒ๋“ค์–ด์ฃผ๋Š” ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์•ผ. ์„ ํƒ์‚ฌํ•ญ์ด์ง€๋งŒ ๊ฐ•๋ ฅ ์ถ”์ฒœ! ๐Ÿ‘

๐Ÿ’ก Pro Tip: ๋กœ์ปฌ ๊ฐœ๋ฐœ ํ™˜๊ฒฝ์—์„œ๋Š” Ganache๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ์ •๋ง ํŽธํ•ด. ์‹ค์ œ ์ด๋”๋ฅผ ์†Œ๋น„ํ•˜์ง€ ์•Š๊ณ ๋„ ๋ธ”๋ก์ฒด์ธ ๊ธฐ๋Šฅ์„ ํ…Œ์ŠคํŠธํ•  ์ˆ˜ ์žˆ๊ฑฐ๋“ . Ganache๋ฅผ ์‹คํ–‰ํ•˜๋ฉด 10๊ฐœ์˜ ํ…Œ์ŠคํŠธ ๊ณ„์ •์ด ๊ฐ๊ฐ 100 ETH์”ฉ ์ œ๊ณต๋ผ!

๐Ÿ“ ์Šค๋งˆํŠธ ์ปจํŠธ๋ž™ํŠธ ์ž‘์„ฑํ•˜๊ธฐ

๋ธ”๋ก์ฒด์ธ CMS์˜ ํ•ต์‹ฌ์€ ์Šค๋งˆํŠธ ์ปจํŠธ๋ž™ํŠธ์•ผ. ์ฝ˜ํ…์ธ  ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ๋ฅผ ์ €์žฅํ•˜๊ณ  ๊ด€๋ฆฌํ•˜๋Š” ๊ฐ„๋‹จํ•œ ์ปจํŠธ๋ž™ํŠธ๋ฅผ ๋งŒ๋“ค์–ด๋ณด์ž.

๐ŸŽจ ContentRegistry ์ปจํŠธ๋ž™ํŠธ

์†”๋ฆฌ๋””ํ‹ฐ๋กœ ์ž‘์„ฑ๋œ ๊ธฐ๋ณธ ์ปจํŠธ๋ž™ํŠธ ์˜ˆ์‹œ์•ผ:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract ContentRegistry {
    struct Content {
        string contentHash;
        address author;
        uint256 timestamp;
        string title;
        bool isActive;
    }
    
    mapping(uint256 => Content) public contents;
    mapping(address => uint256[]) public authorContents;
    uint256 public contentCount;
    
    event ContentRegistered(
        uint256 indexed contentId,
        address indexed author,
        string contentHash,
        uint256 timestamp
    );
    
    event ContentUpdated(
        uint256 indexed contentId,
        string newContentHash
    );
    
    function registerContent(
        string memory _contentHash,
        string memory _title
    ) public returns (uint256) {
        contentCount++;
        
        contents[contentCount] = Content({
            contentHash: _contentHash,
            author: msg.sender,
            timestamp: block.timestamp,
            title: _title,
            isActive: true
        });
        
        authorContents[msg.sender].push(contentCount);
        
        emit ContentRegistered(
            contentCount,
            msg.sender,
            _contentHash,
            block.timestamp
        );
        
        return contentCount;
    }
    
    function updateContent(
        uint256 _contentId,
        string memory _newContentHash
    ) public {
        require(
            contents[_contentId].author == msg.sender,
            "Only author can update"
        );
        require(
            contents[_contentId].isActive,
            "Content is not active"
        );
        
        contents[_contentId].contentHash = _newContentHash;
        
        emit ContentUpdated(_contentId, _newContentHash);
    }
    
    function getContent(uint256 _contentId)
        public
        view
        returns (
            string memory,
            address,
            uint256,
            string memory,
            bool
        )
    {
        Content memory content = contents[_contentId];
        return (
            content.contentHash,
            content.author,
            content.timestamp,
            content.title,
            content.isActive
        );
    }
    
    function getAuthorContents(address _author)
        public
        view
        returns (uint256[] memory)
    {
        return authorContents[_author];
    }
}

์ด ์ปจํŠธ๋ž™ํŠธ๋Š” ์ฝ˜ํ…์ธ ์˜ ํ•ด์‹œ๊ฐ’, ์ž‘์„ฑ์ž, ํƒ€์ž„์Šคํƒฌํ”„, ์ œ๋ชฉ์„ ์ €์žฅํ•ด. ์‹ค์ œ ์ฝ˜ํ…์ธ  ๋‚ด์šฉ์€ IPFS๋‚˜ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค์— ์ €์žฅํ•˜๊ณ , ๊ทธ ํ•ด์‹œ๊ฐ’๋งŒ ๋ธ”๋ก์ฒด์ธ์— ๊ธฐ๋กํ•˜๋Š” ๊ฑฐ์•ผ! ๐Ÿ“ฆ

โš ๏ธ ์ฃผ์˜์‚ฌํ•ญ: ๋ธ”๋ก์ฒด์ธ์— ๋ฐ์ดํ„ฐ๋ฅผ ์ €์žฅํ•˜๋Š” ๊ฑด ๋น„์šฉ์ด ๋“ค์–ด. ๊ฐ€์Šค๋น„๋ฅผ ์ตœ์†Œํ™”ํ•˜๋ ค๋ฉด ๊ผญ ํ•„์š”ํ•œ ๋ฐ์ดํ„ฐ๋งŒ ์ €์žฅํ•˜๊ณ , ๋ฌธ์ž์—ด์€ ๊ฐ€๋Šฅํ•œ ์งง๊ฒŒ ์œ ์ง€ํ•ด์•ผ ํ•ด. IPFS ํ•ด์‹œ ๊ฐ™์€ ๊ฒฝ์šฐ bytes32 ํƒ€์ž…์œผ๋กœ ์ €์žฅํ•˜๋ฉด ๊ฐ€์Šค๋น„๋ฅผ ์ ˆ์•ฝํ•  ์ˆ˜ ์žˆ์–ด!

๐Ÿ”จ ์ปจํŠธ๋ž™ํŠธ ์ปดํŒŒ์ผ ๋ฐ ๋ฐฐํฌ

Truffle์ด๋‚˜ Hardhat์„ ์‚ฌ์šฉํ•ด์„œ ์ปจํŠธ๋ž™ํŠธ๋ฅผ ์ปดํŒŒ์ผํ•˜๊ณ  ๋ฐฐํฌํ•  ์ˆ˜ ์žˆ์–ด. Hardhat์„ ์‚ฌ์šฉํ•˜๋Š” ์˜ˆ์‹œ๋ฅผ ๋ณด์—ฌ์ค„๊ฒŒ:

npm install --save-dev hardhat
npx hardhat init

๊ทธ๋ฆฌ๊ณ  ๋ฐฐํฌ ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์ž‘์„ฑํ•ด:

// scripts/deploy.js
async function main() {
    const ContentRegistry = await ethers.getContractFactory("ContentRegistry");
    const contentRegistry = await ContentRegistry.deploy();
    await contentRegistry.deployed();
    
    console.log("ContentRegistry deployed to:", contentRegistry.address);
}

main()
    .then(() => process.exit(0))
    .catch((error) => {
        console.error(error);
        process.exit(1);
    });

๋กœ์ปฌ Ganache์— ๋ฐฐํฌํ•˜๋ ค๋ฉด:

npx hardhat run scripts/deploy.js --network localhost

๋ฐฐํฌ๊ฐ€ ์™„๋ฃŒ๋˜๋ฉด ์ปจํŠธ๋ž™ํŠธ ์ฃผ์†Œ๊ฐ€ ์ถœ๋ ฅ๋ผ. ์ด ์ฃผ์†Œ๋ฅผ ์ž˜ ๊ธฐ์–ตํ•ด๋‘์ž! ๐ŸŽฏ

๐Ÿ”Œ ๋ผ๋ผ๋ฒจ์— web3.js ํ†ตํ•ฉํ•˜๊ธฐ

์ด์ œ ๋ผ๋ผ๋ฒจ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์—์„œ ๋ธ”๋ก์ฒด์ธ๊ณผ ํ†ต์‹ ํ•  ์ˆ˜ ์žˆ๋„๋ก web3.js๋ฅผ ํ†ตํ•ฉํ•ด๋ณด์ž. ํ”„๋ก ํŠธ์—”๋“œ์™€ ๋ฐฑ์—”๋“œ ์–‘์ชฝ์—์„œ ์ ‘๊ทผํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์•Œ์•„๋ณผ๊ฒŒ!

๐ŸŽจ ํ”„๋ก ํŠธ์—”๋“œ ํ†ตํ•ฉ

๋ผ๋ผ๋ฒจ์˜ resources/js ๋””๋ ‰ํ† ๋ฆฌ์— web3 ๊ด€๋ จ ๋ชจ๋“ˆ์„ ๋งŒ๋“ค์–ด๋ณด์ž:

// resources/js/web3/provider.js
import Web3 from 'web3';

class Web3Provider {
    constructor() {
        this.web3 = null;
        this.account = null;
        this.networkId = null;
    }
    
    async init() {
        if (typeof window.ethereum !== 'undefined') {
            this.web3 = new Web3(window.ethereum);
            try {
                await window.ethereum.request({ 
                    method: 'eth_requestAccounts' 
                });
                const accounts = await this.web3.eth.getAccounts();
                this.account = accounts[0];
                this.networkId = await this.web3.eth.net.getId();
                return true;
            } catch (error) {
                console.error('User denied account access', error);
                return false;
            }
        } else {
            console.error('Please install MetaMask!');
            return false;
        }
    }
    
    getWeb3() {
        return this.web3;
    }
    
    getAccount() {
        return this.account;
    }
    
    getNetworkId() {
        return this.networkId;
    }
}

export default new Web3Provider();

์ด์ œ ์ปจํŠธ๋ž™ํŠธ์™€ ์ƒํ˜ธ์ž‘์šฉํ•˜๋Š” ์„œ๋น„์Šค ํด๋ž˜์Šค๋ฅผ ๋งŒ๋“ค์–ด:

// resources/js/web3/contentService.js
import web3Provider from './provider';
import ContentRegistryABI from './abi/ContentRegistry.json';

class ContentService {
    constructor() {
        this.contractAddress = process.env.MIX_CONTRACT_ADDRESS;
        this.contract = null;
    }
    
    async init() {
        const web3 = web3Provider.getWeb3();
        if (!web3) {
            throw new Error('Web3 not initialized');
        }
        
        this.contract = new web3.eth.Contract(
            ContentRegistryABI,
            this.contractAddress
        );
    }
    
    async registerContent(contentHash, title) {
        const account = web3Provider.getAccount();
        
        try {
            const result = await this.contract.methods
                .registerContent(contentHash, title)
                .send({ from: account });
                
            return {
                success: true,
                transactionHash: result.transactionHash,
                contentId: result.events.ContentRegistered.returnValues.contentId
            };
        } catch (error) {
            console.error('Error registering content:', error);
            return {
                success: false,
                error: error.message
            };
        }
    }
    
    async getContent(contentId) {
        try {
            const content = await this.contract.methods
                .getContent(contentId)
                .call();
                
            return {
                contentHash: content[0],
                author: content[1],
                timestamp: content[2],
                title: content[3],
                isActive: content[4]
            };
        } catch (error) {
            console.error('Error getting content:', error);
            return null;
        }
    }
    
    async updateContent(contentId, newContentHash) {
        const account = web3Provider.getAccount();
        
        try {
            const result = await this.contract.methods
                .updateContent(contentId, newContentHash)
                .send({ from: account });
                
            return {
                success: true,
                transactionHash: result.transactionHash
            };
        } catch (error) {
            console.error('Error updating content:', error);
            return {
                success: false,
                error: error.message
            };
        }
    }
    
    async getAuthorContents(authorAddress) {
        try {
            const contentIds = await this.contract.methods
                .getAuthorContents(authorAddress)
                .call();
                
            return contentIds;
        } catch (error) {
            console.error('Error getting author contents:', error);
            return [];
        }
    }
}

export default new ContentService();

Vue ์ปดํฌ๋„ŒํŠธ์—์„œ ์‚ฌ์šฉํ•˜๋Š” ์˜ˆ์‹œ์•ผ:

// resources/js/components/ContentRegister.vue
<template>
    <div class="content-register">
        <h2>Register New Content</h2>
        
        <form @submit.prevent="registerContent">
            <div class="form-group">
                <label>Title</label>
                <input v-model="title" type="text" required />
            </div>
            
            <div class="form-group">
                <label>Content</label>
                <textarea v-model="content" required></textarea>
            </div>
            
            <button type="submit" :disabled="isProcessing">
                {{ isProcessing ? 'Processing...' : 'Register' }}
            </button>
        </form>
        
        <div v-if="result" class="result">
            <p>Transaction Hash: {{ result.transactionHash }}</p>
            <p>Content ID: {{ result.contentId }}</p>
        </div>
    </div>
</template>

<script>
import web3Provider from '../web3/provider';
import contentService from '../web3/contentService';
import CryptoJS from 'crypto-js';

export default {
    data() {
        return {
            title: '',
            content: '',
            isProcessing: false,
            result: null
        };
    },
    
    async mounted() {
        await web3Provider.init();
        await contentService.init();
    },
    
    methods: {
        async registerContent() {
            this.isProcessing = true;
            this.result = null;
            
            try {
                // 1. ์ฝ˜ํ…์ธ  ํ•ด์‹œ ์ƒ์„ฑ
                const contentHash = CryptoJS.SHA256(this.content).toString();
                
                // 2. ๋ฐฑ์—”๋“œ์— ์ฝ˜ํ…์ธ  ์ €์žฅ
                const response = await axios.post('/api/contents', {
                    title: this.title,
                    content: this.content,
                    hash: contentHash
                });
                
                // 3. ๋ธ”๋ก์ฒด์ธ์— ๋“ฑ๋ก
                const result = await contentService.registerContent(
                    contentHash,
                    this.title
                );
                
                if (result.success) {
                    // 4. ๋ฐฑ์—”๋“œ์— ๋ธ”๋ก์ฒด์ธ ์ •๋ณด ์—…๋ฐ์ดํŠธ
                    await axios.patch(`/api/contents/${response.data.id}`, {
                        blockchain_id: result.contentId,
                        transaction_hash: result.transactionHash
                    });
                    
                    this.result = result;
                    this.title = '';
                    this.content = '';
                }
            } catch (error) {
                console.error('Error:', error);
                alert('Failed to register content');
            } finally {
                this.isProcessing = false;
            }
        }
    }
};
</script>

โš™๏ธ ๋ฐฑ์—”๋“œ API ๊ตฌํ˜„

๋ผ๋ผ๋ฒจ์—์„œ ์ฝ˜ํ…์ธ ๋ฅผ ๊ด€๋ฆฌํ•˜๋Š” API๋ฅผ ๋งŒ๋“ค์–ด๋ณด์ž. ๋จผ์ € ๋ชจ๋ธ๊ณผ ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜์„ ์ƒ์„ฑํ•ด:

php artisan make:model Content -m

๋งˆ์ด๊ทธ๋ ˆ์ด์…˜ ํŒŒ์ผ์„ ์ˆ˜์ •ํ•ด:

// database/migrations/xxxx_create_contents_table.php
public function up()
{
    Schema::create('contents', function (Blueprint $table) {
        $table->id();
        $table->string('title');
        $table->text('content');
        $table->string('hash')->unique();
        $table->unsignedBigInteger('blockchain_id')->nullable();
        $table->string('transaction_hash')->nullable();
        $table->string('author_address')->nullable();
        $table->foreignId('user_id')->constrained()->onDelete('cascade');
        $table->enum('status', ['draft', 'published', 'archived'])->default('draft');
        $table->timestamps();
        
        $table->index('blockchain_id');
        $table->index('author_address');
    });
}

Content ๋ชจ๋ธ์— ๊ด€๊ณ„์™€ ๋ฉ”์„œ๋“œ๋ฅผ ์ถ”๊ฐ€ํ•ด:

// app/Models/Content.php
namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Content extends Model
{
    protected $fillable = [
        'title',
        'content',
        'hash',
        'blockchain_id',
        'transaction_hash',
        'author_address',
        'user_id',
        'status'
    ];
    
    protected $casts = [
        'blockchain_id' => 'integer',
    ];
    
    public function user()
    {
        return $this->belongsTo(User::class);
    }
    
    public function isOnBlockchain()
    {
        return !is_null($this->blockchain_id);
    }
    
    public function getBlockchainUrl()
    {
        if (!$this->transaction_hash) {
            return null;
        }
        
        $network = config('blockchain.network');
        $baseUrl = config("blockchain.explorer_urls.{$network}");
        
        return "{$baseUrl}/tx/{$this->transaction_hash}";
    }
}

์ปจํŠธ๋กค๋Ÿฌ๋ฅผ ์ƒ์„ฑํ•˜๊ณ  CRUD ๋กœ์ง์„ ๊ตฌํ˜„ํ•ด:

// app/Http/Controllers/Api/ContentController.php
namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Models\Content;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;

class ContentController extends Controller
{
    public function index(Request $request)
    {
        $query = Content::with('user')
            ->where('status', 'published');
            
        if ($request->has('author_address')) {
            $query->where('author_address', $request->author_address);
        }
        
        $contents = $query->latest()->paginate(20);
        
        return response()->json($contents);
    }
    
    public function store(Request $request)
    {
        $validated = $request->validate([
            'title' => 'required|string|max:255',
            'content' => 'required|string',
            'hash' => 'required|string|unique:contents'
        ]);
        
        $content = Content::create([
            'title' => $validated['title'],
            'content' => $validated['content'],
            'hash' => $validated['hash'],
            'user_id' => auth()->id(),
            'status' => 'draft'
        ]);
        
        return response()->json($content, 201);
    }
    
    public function show($id)
    {
        $content = Content::with('user')->findOrFail($id);
        
        return response()->json($content);
    }
    
    public function update(Request $request, $id)
    {
        $content = Content::findOrFail($id);
        
        // ๊ถŒํ•œ ์ฒดํฌ
        if ($content->user_id !== auth()->id()) {
            return response()->json([
                'message' => 'Unauthorized'
            ], 403);
        }
        
        $validated = $request->validate([
            'title' => 'sometimes|string|max:255',
            'content' => 'sometimes|string',
            'blockchain_id' => 'sometimes|integer',
            'transaction_hash' => 'sometimes|string',
            'author_address' => 'sometimes|string',
            'status' => 'sometimes|in:draft,published,archived'
        ]);
        
        $content->update($validated);
        
        return response()->json($content);
    }
    
    public function destroy($id)
    {
        $content = Content::findOrFail($id);
        
        if ($content->user_id !== auth()->id()) {
            return response()->json([
                'message' => 'Unauthorized'
            ], 403);
        }
        
        // ๋ธ”๋ก์ฒด์ธ์— ๋“ฑ๋ก๋œ ์ฝ˜ํ…์ธ ๋Š” ์™„์ „ ์‚ญ์ œ ๋ถˆ๊ฐ€
        if ($content->isOnBlockchain()) {
            $content->update(['status' => 'archived']);
            return response()->json([
                'message' => 'Content archived (blockchain record preserved)'
            ]);
        }
        
        $content->delete();
        
        return response()->json([
            'message' => 'Content deleted'
        ]);
    }
    
    public function verify(Request $request, $id)
    {
        $content = Content::findOrFail($id);
        
        $validated = $request->validate([
            'content' => 'required|string'
        ]);
        
        $hash = hash('sha256', $validated['content']);
        
        return response()->json([
            'is_valid' => $hash === $content->hash,
            'stored_hash' => $content->hash,
            'computed_hash' => $hash
        ]);
    }
}

๋ผ์šฐํŠธ๋ฅผ ๋“ฑ๋กํ•ด:

// routes/api.php
use App\Http\Controllers\Api\ContentController;

Route::middleware('auth:sanctum')->group(function () {
    Route::apiResource('contents', ContentController::class);
    Route::post('contents/{id}/verify', [ContentController::class, 'verify']);
});
๐Ÿ’ก ํ•˜์ด๋ธŒ๋ฆฌ๋“œ ์ ‘๊ทผ๋ฒ•: ๋ชจ๋“  ๋ฐ์ดํ„ฐ๋ฅผ ๋ธ”๋ก์ฒด์ธ์— ์ €์žฅํ•˜๋ฉด ๋น„์šฉ์ด ๋„ˆ๋ฌด ๋งŽ์ด ๋“ค์–ด. ๊ทธ๋ž˜์„œ ์ค‘์š”ํ•œ ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ(ํ•ด์‹œ, ํƒ€์ž„์Šคํƒฌํ”„, ์†Œ์œ ๊ถŒ)๋งŒ ๋ธ”๋ก์ฒด์ธ์— ์ €์žฅํ•˜๊ณ , ์‹ค์ œ ์ฝ˜ํ…์ธ ๋Š” ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค์— ์ €์žฅํ•˜๋Š” ํ•˜์ด๋ธŒ๋ฆฌ๋“œ ๋ฐฉ์‹์„ ์‚ฌ์šฉํ•ด. ์ด๋ ‡๊ฒŒ ํ•˜๋ฉด ๋น„์šฉ์„ ์ ˆ์•ฝํ•˜๋ฉด์„œ๋„ ๋ธ”๋ก์ฒด์ธ์˜ ์žฅ์ ์„ ํ™œ์šฉํ•  ์ˆ˜ ์žˆ์–ด! ๐Ÿ’ฐ

๐Ÿ” ๋ฉ”ํƒ€๋งˆ์Šคํฌ ์—ฐ๋™ ๋ฐ ์ธ์ฆ

๋ธ”๋ก์ฒด์ธ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์—์„œ ์‚ฌ์šฉ์ž ์ธ์ฆ์€ ์ „ํ†ต์ ์ธ ๋ฐฉ์‹๊ณผ ์ข€ ๋‹ฌ๋ผ. ๋ฉ”ํƒ€๋งˆ์Šคํฌ ๊ฐ™์€ ์ง€๊ฐ‘์„ ํ†ตํ•ด ์„œ๋ช…์„ ๋ฐ›์•„์„œ ์ธ์ฆํ•˜๋Š” ๋ฐฉ์‹์„ ๊ตฌํ˜„ํ•ด๋ณด์ž!

๐Ÿ”‘ Web3 ์ธ์ฆ ์‹œ์Šคํ…œ

๋ฉ”ํƒ€๋งˆ์Šคํฌ๋กœ ๋กœ๊ทธ์ธํ•˜๋Š” ํ”Œ๋กœ์šฐ๋Š” ์ด๋ ‡๊ฒŒ ๋™์ž‘ํ•ด:

// resources/js/web3/auth.js
import web3Provider from './provider';
import axios from 'axios';

class Web3Auth {
    async login() {
        try {
            // 1. Web3 ์ดˆ๊ธฐํ™” ๋ฐ ๊ณ„์ • ๊ฐ€์ ธ์˜ค๊ธฐ
            const initialized = await web3Provider.init();
            if (!initialized) {
                throw new Error('Failed to initialize Web3');
            }
            
            const account = web3Provider.getAccount();
            const web3 = web3Provider.getWeb3();
            
            // 2. ๋ฐฑ์—”๋“œ์—์„œ nonce ์š”์ฒญ
            const nonceResponse = await axios.post('/api/auth/nonce', {
                address: account
            });
            
            const nonce = nonceResponse.data.nonce;
            
            // 3. ๋ฉ”์‹œ์ง€ ์„œ๋ช…
            const message = `Sign this message to authenticate with Blockchain CMS.\n\nNonce: ${nonce}`;
            const signature = await web3.eth.personal.sign(
                message,
                account,
                ''
            );
            
            // 4. ์„œ๋ช… ๊ฒ€์ฆ ๋ฐ ํ† ํฐ ๋ฐœ๊ธ‰
            const authResponse = await axios.post('/api/auth/verify', {
                address: account,
                signature: signature,
                message: message
            });
            
            // 5. ํ† ํฐ ์ €์žฅ
            localStorage.setItem('auth_token', authResponse.data.token);
            localStorage.setItem('wallet_address', account);
            
            return {
                success: true,
                token: authResponse.data.token,
                user: authResponse.data.user
            };
            
        } catch (error) {
            console.error('Login error:', error);
            return {
                success: false,
                error: error.message
            };
        }
    }
    
    async logout() {
        localStorage.removeItem('auth_token');
        localStorage.removeItem('wallet_address');
        
        await axios.post('/api/auth/logout');
    }
    
    isAuthenticated() {
        return !!localStorage.getItem('auth_token');
    }
    
    getToken() {
        return localStorage.getItem('auth_token');
    }
    
    getWalletAddress() {
        return localStorage.getItem('wallet_address');
    }
}

export default new Web3Auth();

๋ฐฑ์—”๋“œ ์ธ์ฆ ์ปจํŠธ๋กค๋Ÿฌ:

// app/Http/Controllers/Api/AuthController.php
namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Support\Str;
use Illuminate\Support\Facades\Cache;
use Laravel\Sanctum\PersonalAccessToken;

class AuthController extends Controller
{
    public function nonce(Request $request)
    {
        $validated = $request->validate([
            'address' => 'required|string'
        ]);
        
        $address = strtolower($validated['address']);
        $nonce = Str::random(32);
        
        // nonce๋ฅผ 5๋ถ„๊ฐ„ ์บ์‹œ์— ์ €์žฅ
        Cache::put("auth_nonce:{$address}", $nonce, 300);
        
        return response()->json([
            'nonce' => $nonce
        ]);
    }
    
    public function verify(Request $request)
    {
        $validated = $request->validate([
            'address' => 'required|string',
            'signature' => 'required|string',
            'message' => 'required|string'
        ]);
        
        $address = strtolower($validated['address']);
        $signature = $validated['signature'];
        $message = $validated['message'];
        
        // nonce ํ™•์ธ
        $cachedNonce = Cache::get("auth_nonce:{$address}");
        if (!$cachedNonce || !str_contains($message, $cachedNonce)) {
            return response()->json([
                'message' => 'Invalid nonce'
            ], 401);
        }
        
        // ์„œ๋ช… ๊ฒ€์ฆ
        $recoveredAddress = $this->recoverAddress($message, $signature);
        
        if (strtolower($recoveredAddress) !== $address) {
            return response()->json([
                'message' => 'Invalid signature'
            ], 401);
        }
        
        // nonce ์‚ญ์ œ (์žฌ์‚ฌ์šฉ ๋ฐฉ์ง€)
        Cache::forget("auth_nonce:{$address}");
        
        // ์‚ฌ์šฉ์ž ์ฐพ๊ธฐ ๋˜๋Š” ์ƒ์„ฑ
        $user = User::firstOrCreate(
            ['wallet_address' => $address],
            ['name' => "User_{$address}"]
        );
        
        // ํ† ํฐ ๋ฐœ๊ธ‰
        $token = $user->createToken('web3-auth')->plainTextToken;
        
        return response()->json([
            'token' => $token,
            'user' => $user
        ]);
    }
    
    public function logout(Request $request)
    {
        $request->user()->currentAccessToken()->delete();
        
        return response()->json([
            'message' => 'Logged out successfully'
        ]);
    }
    
    private function recoverAddress($message, $signature)
    {
        // ์ด๋”๋ฆฌ์›€ ์„œ๋ช… ๊ฒ€์ฆ์„ ์œ„ํ•œ ํ—ฌํผ ํ•จ์ˆ˜
        // web3-php ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์‚ฌ์šฉ ๊ถŒ์žฅ
        $hash = "\x19Ethereum Signed Message:\n" . strlen($message) . $message;
        $hash = hash('sha3-256', $hash, true);
        
        // ์‹ค์ œ ๊ตฌํ˜„์—์„œ๋Š” elliptic curve ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ํ•„์š”
        // ์—ฌ๊ธฐ์„œ๋Š” ๊ฐœ๋…์  ์„ค๋ช…์„ ์œ„ํ•œ ์˜์‚ฌ์ฝ”๋“œ
        
        return '0x...'; // ๋ณต๊ตฌ๋œ ์ฃผ์†Œ ๋ฐ˜ํ™˜
    }
}

์‹ค์ œ ํ”„๋กœ๋•์…˜ ํ™˜๊ฒฝ์—์„œ๋Š” web3-php ๊ฐ™์€ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์‚ฌ์šฉํ•ด์„œ ์„œ๋ช…์„ ๊ฒ€์ฆํ•ด์•ผ ํ•ด. PHP์—์„œ ์ง์ ‘ ํƒ€์›๊ณก์„  ์•”ํ˜ธํ™”๋ฅผ ๊ตฌํ˜„ํ•˜๋Š” ๊ฑด ๋ณต์žกํ•˜๊ณ  ์œ„ํ—˜ํ•˜๊ฑฐ๋“ ! ๐Ÿ”’

โš ๏ธ ๋ณด์•ˆ ์ฃผ์˜์‚ฌํ•ญ: 1. Nonce๋Š” ๋ฐ˜๋“œ์‹œ ์ผํšŒ์šฉ์œผ๋กœ ์‚ฌ์šฉํ•˜๊ณ  ์žฌ์‚ฌ์šฉ์„ ๋ฐฉ์ง€ํ•ด์•ผ ํ•ด
2. ์„œ๋ช… ๊ฒ€์ฆ์€ ์„œ๋ฒ„ ์‚ฌ์ด๋“œ์—์„œ ๋ฐ˜๋“œ์‹œ ์ˆ˜ํ–‰ํ•ด์•ผ ํ•ด
3. HTTPS๋ฅผ ์‚ฌ์šฉํ•ด์„œ ์ค‘๊ฐ„์ž ๊ณต๊ฒฉ์„ ๋ฐฉ์ง€ํ•ด์•ผ ํ•ด
4. Rate limiting์„ ์ ์šฉํ•ด์„œ brute force ๊ณต๊ฒฉ์„ ๋ง‰์•„์•ผ ํ•ด

๐Ÿ“ฆ IPFS ํ†ตํ•ฉํ•˜๊ธฐ

ํฐ ํŒŒ์ผ์ด๋‚˜ ๋ฏธ๋””์–ด ์ฝ˜ํ…์ธ ๋ฅผ ๋ธ”๋ก์ฒด์ธ์— ์ง์ ‘ ์ €์žฅํ•˜๋Š” ๊ฑด ๋น„ํ˜„์‹ค์ ์ด์•ผ. ๋Œ€์‹  IPFS(InterPlanetary File System)๋ผ๋Š” ๋ถ„์‚ฐ ํŒŒ์ผ ์‹œ์Šคํ…œ์„ ์‚ฌ์šฉํ•˜๋ฉด ์™„๋ฒฝํ•ด! ๐ŸŒ

๐ŸŒ IPFS๋ž€?

IPFS๋Š” ์ฝ˜ํ…์ธ  ์ฃผ์†Œ ์ง€์ • ๋ฐฉ์‹์„ ์‚ฌ์šฉํ•˜๋Š” ๋ถ„์‚ฐ ํŒŒ์ผ ์‹œ์Šคํ…œ์ด์•ผ. ํŒŒ์ผ์„ ์—…๋กœ๋“œํ•˜๋ฉด ๊ณ ์œ ํ•œ ํ•ด์‹œ(CID)๊ฐ€ ์ƒ์„ฑ๋˜๊ณ , ์ด ํ•ด์‹œ๋กœ ์ „ ์„ธ๊ณ„ ์–ด๋””์„œ๋“  ํŒŒ์ผ์— ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ์–ด.

๋ธ”๋ก์ฒด์ธ + IPFS ์กฐํ•ฉ์€ ์ •๋ง ๊ฐ•๋ ฅํ•ด:
โ€ข IPFS์— ํŒŒ์ผ ์ €์žฅ โ†’ CID ํš๋“
โ€ข ๋ธ”๋ก์ฒด์ธ์— CID ์ €์žฅ โ†’ ๋ถˆ๋ณ€์„ฑ ๋ณด์žฅ
โ€ข ๋ˆ„๊ตฌ๋‚˜ CID๋กœ ํŒŒ์ผ ๊ฒ€์ฆ ๊ฐ€๋Šฅ โœจ

๐Ÿ“ค IPFS ํด๋ผ์ด์–ธํŠธ ์„ค์ •

Pinata๋‚˜ Infura ๊ฐ™์€ IPFS ๊ฒŒ์ดํŠธ์›จ์ด ์„œ๋น„์Šค๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ์‰ฝ๊ฒŒ ์‹œ์ž‘ํ•  ์ˆ˜ ์žˆ์–ด:

npm install ipfs-http-client

IPFS ์„œ๋น„์Šค ํด๋ž˜์Šค ์ƒ์„ฑ:

// resources/js/services/ipfsService.js
import { create } from 'ipfs-http-client';

class IPFSService {
    constructor() {
        this.client = create({
            host: 'ipfs.infura.io',
            port: 5001,
            protocol: 'https',
            headers: {
                authorization: 'Basic ' + btoa(
                    process.env.MIX_INFURA_PROJECT_ID + ':' + 
                    process.env.MIX_INFURA_PROJECT_SECRET
                )
            }
        });
    }
    
    async uploadFile(file) {
        try {
            const added = await this.client.add(file, {
                progress: (prog) => console.log(`Uploaded: ${prog}`)
            });
            
            return {
                success: true,
                cid: added.cid.toString(),
                path: added.path,
                size: added.size
            };
        } catch (error) {
            console.error('IPFS upload error:', error);
            return {
                success: false,
                error: error.message
            };
        }
    }
    
    async uploadJSON(data) {
        try {
            const jsonString = JSON.stringify(data);
            const added = await this.client.add(jsonString);
            
            return {
                success: true,
                cid: added.cid.toString()
            };
        } catch (error) {
            console.error('IPFS JSON upload error:', error);
            return {
                success: false,
                error: error.message
            };
        }
    }
    
    getGatewayUrl(cid) {
        return `https://ipfs.io/ipfs/${cid}`;
    }
    
    async getContent(cid) {
        try {
            const stream = this.client.cat(cid);
            let data = '';
            
            for await (const chunk of stream) {
                data += chunk.toString();
            }
            
            return {
                success: true,
                data: data
            };
        } catch (error) {
            console.error('IPFS get error:', error);
            return {
                success: false,
                error: error.message
            };
        }
    }
}

export default new IPFSService();

Vue ์ปดํฌ๋„ŒํŠธ์—์„œ IPFS ์—…๋กœ๋“œ ์‚ฌ์šฉํ•˜๊ธฐ:

// resources/js/components/IPFSUploader.vue
<template>
    <div class="ipfs-uploader">
        <input 
            type="file" 
            @change="handleFileSelect" 
            ref="fileInput"
        />
        
        <button 
            @click="uploadToIPFS" 
            :disabled="!selectedFile || isUploading"
        >
            {{ isUploading ? 'Uploading...' : 'Upload to IPFS' }}
        </button>
        
        <div v-if="uploadResult" class="result">
            <p>CID: {{ uploadResult.cid }}</p>
            <a :href="getGatewayUrl(uploadResult.cid)" target="_blank">
                View on IPFS
            </a>
        </div>
    </div>
</template>

<script>
import ipfsService from '../services/ipfsService';

export default {
    data() {
        return {
            selectedFile: null,
            isUploading: false,
            uploadResult: null
        };
    },
    
    methods: {
        handleFileSelect(event) {
            this.selectedFile = event.target.files[0];
        },
        
        async uploadToIPFS() {
            if (!this.selectedFile) return;
            
            this.isUploading = true;
            
            try {
                const result = await ipfsService.uploadFile(this.selectedFile);
                
                if (result.success) {
                    this.uploadResult = result;
                    this.$emit('uploaded', result);
                } else {
                    alert('Upload failed: ' + result.error);
                }
            } finally {
                this.isUploading = false;
            }
        },
        
        getGatewayUrl(cid) {
            return ipfsService.getGatewayUrl(cid);
        }
    }
};
</script>

๐Ÿ”— ๋ธ”๋ก์ฒด์ธ + IPFS ํ†ตํ•ฉ ์›Œํฌํ”Œ๋กœ์šฐ

์™„์ „ํ•œ ์›Œํฌํ”Œ๋กœ์šฐ๋Š” ์ด๋ ‡๊ฒŒ ๋™์ž‘ํ•ด:

// ํ†ตํ•ฉ ์ฝ˜ํ…์ธ  ๋“ฑ๋ก ํ”„๋กœ์„ธ์Šค
async function registerContentWithIPFS(title, content, file) {
    try {
        // 1. ํŒŒ์ผ์„ IPFS์— ์—…๋กœ๋“œ
        const ipfsResult = await ipfsService.uploadFile(file);
        if (!ipfsResult.success) {
            throw new Error('IPFS upload failed');
        }
        
        // 2. ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ ๊ฐ์ฒด ์ƒ์„ฑ
        const metadata = {
            title: title,
            content: content,
            ipfsCID: ipfsResult.cid,
            timestamp: Date.now(),
            fileSize: ipfsResult.size
        };
        
        // 3. ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ๋ฅผ IPFS์— ์—…๋กœ๋“œ
        const metadataResult = await ipfsService.uploadJSON(metadata);
        if (!metadataResult.success) {
            throw new Error('Metadata upload failed');
        }
        
        // 4. ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ CID๋ฅผ ๋ธ”๋ก์ฒด์ธ์— ๋“ฑ๋ก
        const blockchainResult = await contentService.registerContent(
            metadataResult.cid,
            title
        );
        
        if (!blockchainResult.success) {
            throw new Error('Blockchain registration failed');
        }
        
        // 5. ๋ฐฑ์—”๋“œ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค์— ๋ชจ๋“  ์ •๋ณด ์ €์žฅ
        const dbResult = await axios.post('/api/contents', {
            title: title,
            content: content,
            ipfs_cid: ipfsResult.cid,
            metadata_cid: metadataResult.cid,
            blockchain_id: blockchainResult.contentId,
            transaction_hash: blockchainResult.transactionHash
        });
        
        return {
            success: true,
            data: dbResult.data
        };
        
    } catch (error) {
        console.error('Registration error:', error);
        return {
            success: false,
            error: error.message
        };
    }
}

์ด๋ ‡๊ฒŒ ํ•˜๋ฉด ํŒŒ์ผ์€ IPFS์—, ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ๋Š” ๋ธ”๋ก์ฒด์ธ์—, ์ „์ฒด ์ •๋ณด๋Š” ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค์— ์ €์žฅ๋˜๋Š” ์™„๋ฒฝํ•œ 3์ค‘ ๊ตฌ์กฐ๊ฐ€ ์™„์„ฑ๋ผ! ๐ŸŽฏ

๐Ÿ’ก IPFS ํŒ: โ€ข Pinning ์„œ๋น„์Šค๋ฅผ ์‚ฌ์šฉํ•ด์„œ ํŒŒ์ผ์ด ๋„คํŠธ์›Œํฌ์—์„œ ์‚ฌ๋ผ์ง€์ง€ ์•Š๋„๋ก ํ•ด์•ผ ํ•ด
โ€ข ํฐ ํŒŒ์ผ์€ ์ฒญํฌ๋กœ ๋‚˜๋ˆ ์„œ ์—…๋กœ๋“œํ•˜๋ฉด ํšจ์œจ์ ์ด์•ผ
โ€ข CID๋Š” ์ฝ˜ํ…์ธ  ๊ธฐ๋ฐ˜ ์ฃผ์†Œ๋ผ์„œ ํŒŒ์ผ์ด ์กฐ๊ธˆ์ด๋ผ๋„ ๋ณ€๊ฒฝ๋˜๋ฉด ์™„์ „ํžˆ ๋‹ค๋ฅธ CID๊ฐ€ ์ƒ์„ฑ๋ผ
โ€ข ํ”„๋ผ์ด๋น— ๋ฐ์ดํ„ฐ๋Š” ์•”ํ˜ธํ™”ํ•œ ํ›„ IPFS์— ์—…๋กœ๋“œํ•ด์•ผ ํ•ด! ๐Ÿ”

โšก ์„ฑ๋Šฅ ์ตœ์ ํ™” ์ „๋žต

๋ธ”๋ก์ฒด์ธ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์€ ์ผ๋ฐ˜ ์›น์•ฑ๋ณด๋‹ค ๋А๋ฆด ์ˆ˜ ์žˆ์–ด. ํŠธ๋žœ์žญ์…˜ ํ™•์ธ ์‹œ๊ฐ„, ๊ฐ€์Šค๋น„, ๋„คํŠธ์›Œํฌ ์ง€์—ฐ ๋“ฑ์„ ๊ณ ๋ คํ•ด์•ผ ํ•˜๊ฑฐ๋“ . ์„ฑ๋Šฅ์„ ์ตœ์ ํ™”ํ•˜๋Š” ๋ช‡ ๊ฐ€์ง€ ์ „๋žต์„ ์•Œ์•„๋ณด์ž! ๐Ÿš€

๐Ÿ“Š ์บ์‹ฑ ์ „๋žต

๋ธ”๋ก์ฒด์ธ ๋ฐ์ดํ„ฐ๋Š” ๋ถˆ๋ณ€์ด๋‹ˆ๊นŒ ์ ๊ทน์ ์œผ๋กœ ์บ์‹ฑํ•  ์ˆ˜ ์žˆ์–ด:

// app/Services/BlockchainCacheService.php
namespace App\Services;

use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Redis;

class BlockchainCacheService
{
    protected $ttl = 3600; // 1์‹œ๊ฐ„
    
    public function getContent($blockchainId)
    {
        $cacheKey = "blockchain:content:{$blockchainId}";
        
        return Cache::remember($cacheKey, $this->ttl, function () use ($blockchainId) {
            // ๋ธ”๋ก์ฒด์ธ์—์„œ ๋ฐ์ดํ„ฐ ๊ฐ€์ ธ์˜ค๊ธฐ
            return $this->fetchFromBlockchain($blockchainId);
        });
    }
    
    public function getAuthorContents($authorAddress)
    {
        $cacheKey = "blockchain:author:{$authorAddress}";
        
        return Cache::remember($cacheKey, $this->ttl, function () use ($authorAddress) {
            return $this->fetchAuthorContents($authorAddress);
        });
    }
    
    public function invalidateContent($blockchainId)
    {
        $cacheKey = "blockchain:content:{$blockchainId}";
        Cache::forget($cacheKey);
    }
    
    public function cacheTransaction($transactionHash, $data)
    {
        $cacheKey = "blockchain:tx:{$transactionHash}";
        Cache::put($cacheKey, $data, $this->ttl * 24); // 24์‹œ๊ฐ„
    }
    
    private function fetchFromBlockchain($blockchainId)
    {
        // ์‹ค์ œ ๋ธ”๋ก์ฒด์ธ ์กฐํšŒ ๋กœ์ง
        // web3-php ์‚ฌ์šฉ
        return [];
    }
    
    private function fetchAuthorContents($authorAddress)
    {
        // ์‹ค์ œ ๋ธ”๋ก์ฒด์ธ ์กฐํšŒ ๋กœ์ง
        return [];
    }
}

๐Ÿ”„ ๋น„๋™๊ธฐ ์ฒ˜๋ฆฌ

๋ธ”๋ก์ฒด์ธ ํŠธ๋žœ์žญ์…˜์€ ์‹œ๊ฐ„์ด ๊ฑธ๋ฆฌ๋‹ˆ๊นŒ ํ๋ฅผ ์‚ฌ์šฉํ•ด์„œ ๋น„๋™๊ธฐ๋กœ ์ฒ˜๋ฆฌํ•˜์ž:

// app/Jobs/RegisterContentOnBlockchain.php
namespace App\Jobs;

use App\Models\Content;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;

class RegisterContentOnBlockchain implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
    
    protected $content;
    
    public function __construct(Content $content)
    {
        $this->content = $content;
    }
    
    public function handle()
    {
        try {
            // ๋ธ”๋ก์ฒด์ธ์— ๋“ฑ๋ก
            $result = $this->registerOnBlockchain(
                $this->content->hash,
                $this->content->title
            );
            
            // ๊ฒฐ๊ณผ ์—…๋ฐ์ดํŠธ
            $this->content->update([
                'blockchain_id' => $result['contentId'],
                'transaction_hash' => $result['transactionHash'],
                'status' => 'published'
            ]);
            
            // ์‚ฌ์šฉ์ž์—๊ฒŒ ์•Œ๋ฆผ
            $this->content->user->notify(
                new ContentPublishedNotification($this->content)
            );
            
        } catch (\Exception $e) {
            // ์‹คํŒจ ์ฒ˜๋ฆฌ
            $this->content->update([
                'status' => 'failed',
                'error_message' => $e->getMessage()
            ]);
            
            // ์žฌ์‹œ๋„
            $this->release(60); // 60์ดˆ ํ›„ ์žฌ์‹œ๋„
        }
    }
    
    private function registerOnBlockchain($hash, $title)
    {
        // web3-php๋ฅผ ์‚ฌ์šฉํ•œ ์‹ค์ œ ๋ธ”๋ก์ฒด์ธ ๋“ฑ๋ก ๋กœ์ง
        return [
            'contentId' => 123,
            'transactionHash' => '0x...'
        ];
    }
}

์ปจํŠธ๋กค๋Ÿฌ์—์„œ ํ ๋””์ŠคํŒจ์น˜:

public function store(Request $request)
{
    $validated = $request->validate([
        'title' => 'required|string|max:255',
        'content' => 'required|string'
    ]);
    
    $content = Content::create([
        'title' => $validated['title'],
        'content' => $validated['content'],
        'hash' => hash('sha256', $validated['content']),
        'user_id' => auth()->id(),
        'status' => 'pending'
    ]);
    
    // ๋น„๋™๊ธฐ๋กœ ๋ธ”๋ก์ฒด์ธ ๋“ฑ๋ก
    RegisterContentOnBlockchain::dispatch($content);
    
    return response()->json([
        'message' => 'Content is being registered on blockchain',
        'content' => $content
    ], 202);
}

๐Ÿ’ฐ ๊ฐ€์Šค๋น„ ์ตœ์ ํ™”

๊ฐ€์Šค๋น„๋ฅผ ์ค„์ด๋Š” ์Šค๋งˆํŠธ ์ปจํŠธ๋ž™ํŠธ ์ตœ์ ํ™” ํŒ:

// ์ตœ์ ํ™”๋œ ์ปจํŠธ๋ž™ํŠธ ์˜ˆ์‹œ
contract OptimizedContentRegistry {
    // string ๋Œ€์‹  bytes32 ์‚ฌ์šฉ (๊ฐ€์Šค๋น„ ์ ˆ์•ฝ)
    struct Content {
        bytes32 contentHash;
        address author;
        uint40 timestamp; // uint256 ๋Œ€์‹  uint40 ์‚ฌ์šฉ
        bool isActive;
    }
    
    // mapping์ด array๋ณด๋‹ค ๊ฐ€์Šค๋น„๊ฐ€ ์ €๋ ด
    mapping(uint256 => Content) public contents;
    mapping(address => uint256[]) private authorContents;
    
    uint256 public contentCount;
    
    // ์ด๋ฒคํŠธ๋Š” storage๋ณด๋‹ค ์ €๋ ด
    event ContentRegistered(
        uint256 indexed contentId,
        address indexed author,
        bytes32 contentHash
    );
    
    function registerContent(bytes32 _contentHash) 
        external 
        returns (uint256) 
    {
        contentCount++;
        
        contents[contentCount] = Content({
            contentHash: _contentHash,
            author: msg.sender,
            timestamp: uint40(block.timestamp),
            isActive: true
        });
        
        authorContents[msg.sender].push(contentCount);
        
        emit ContentRegistered(
            contentCount,
            msg.sender,
            _contentHash
        );
        
        return contentCount;
    }
    
    // view ํ•จ์ˆ˜๋Š” ๊ฐ€์Šค๋น„ ์—†์Œ
    function getContent(uint256 _contentId)
        external
        view
        returns (bytes32, address, uint40, bool)
    {
        Content memory content = contents[_contentId];
        return (
            content.contentHash,
            content.author,
            content.timestamp,
            content.isActive
        );
    }
}

๐Ÿ“ก ์ด๋ฒคํŠธ ๋ฆฌ์Šค๋‹

๋ธ”๋ก์ฒด์ธ ์ด๋ฒคํŠธ๋ฅผ ์‹ค์‹œ๊ฐ„์œผ๋กœ ๊ฐ์ง€ํ•ด์„œ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค๋ฅผ ๋™๊ธฐํ™”ํ•˜์ž:

// resources/js/services/eventListener.js
class BlockchainEventListener {
    constructor(contract) {
        this.contract = contract;
        this.listeners = new Map();
    }
    
    async startListening() {
        // ContentRegistered ์ด๋ฒคํŠธ ๊ตฌ๋…
        this.contract.events.ContentRegistered({
            fromBlock: 'latest'
        })
        .on('data', async (event) => {
            await this.handleContentRegistered(event);
        })
        .on('error', console.error);
        
        // ContentUpdated ์ด๋ฒคํŠธ ๊ตฌ๋…
        this.contract.events.ContentUpdated({
            fromBlock: 'latest'
        })
        .on('data', async (event) => {
            await this.handleContentUpdated(event);
        })
        .on('error', console.error);
    }
    
    async handleContentRegistered(event) {
        const { contentId, author, contentHash } = event.returnValues;
        
        // ๋ฐฑ์—”๋“œ์— ์•Œ๋ฆผ
        await axios.post('/api/blockchain/events/content-registered', {
            content_id: contentId,
            author: author,
            content_hash: contentHash,
            transaction_hash: event.transactionHash,
            block_number: event.blockNumber
        });
    }
    
    async handleContentUpdated(event) {
        const { contentId, newContentHash } = event.returnValues;
        
        await axios.post('/api/blockchain/events/content-updated', {
            content_id: contentId,
            new_content_hash: newContentHash,
            transaction_hash: event.transactionHash
        });
    }
    
    stopListening() {
        // ๋ชจ๋“  ๋ฆฌ์Šค๋„ˆ ์ •๋ฆฌ
        this.listeners.forEach(listener => {
            listener.unsubscribe();
        });
        this.listeners.clear();
    }
}

export default BlockchainEventListener;
๐Ÿ’ก ์„ฑ๋Šฅ ์ตœ์ ํ™” ์ฒดํฌ๋ฆฌ์ŠคํŠธ: โœ… ๋ธ”๋ก์ฒด์ธ ๋ฐ์ดํ„ฐ๋Š” ์ ๊ทน์ ์œผ๋กœ ์บ์‹ฑ
โœ… ๋ฌด๊ฑฐ์šด ์ž‘์—…์€ ํ๋กœ ๋น„๋™๊ธฐ ์ฒ˜๋ฆฌ
โœ… ๊ฐ€์Šค๋น„ ์ตœ์ ํ™”๋ฅผ ์œ„ํ•ด ๋ฐ์ดํ„ฐ ํƒ€์ž… ์‹ ์ค‘ํžˆ ์„ ํƒ
โœ… ์ด๋ฒคํŠธ๋ฅผ ํ™œ์šฉํ•ด์„œ ํด๋ง ์ตœ์†Œํ™”
โœ… ๋ ˆ์ด์–ด2 ์†”๋ฃจ์…˜(Polygon, Arbitrum) ๊ณ ๋ ค
โœ… ๋ฐฐ์น˜ ์ฒ˜๋ฆฌ๋กœ ์—ฌ๋Ÿฌ ํŠธ๋žœ์žญ์…˜ ๋ฌถ๊ธฐ

๐Ÿ”’ ๋ณด์•ˆ ๊ณ ๋ ค์‚ฌํ•ญ

๋ธ”๋ก์ฒด์ธ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์€ ๋ณด์•ˆ์ด ์ •๋ง ์ค‘์š”ํ•ด. ํ•œ๋ฒˆ ๋ฐฐํฌ๋œ ์Šค๋งˆํŠธ ์ปจํŠธ๋ž™ํŠธ๋Š” ์ˆ˜์ •์ด ์–ด๋ ต๊ณ , ํ•ดํ‚น๋‹นํ•˜๋ฉด ์ž๊ธˆ ์†์‹ค๋กœ ์ด์–ด์งˆ ์ˆ˜ ์žˆ๊ฑฐ๋“ ! ๐Ÿ˜ฑ

๐Ÿ›ก๏ธ ์Šค๋งˆํŠธ ์ปจํŠธ๋ž™ํŠธ ๋ณด์•ˆ

์ปจํŠธ๋ž™ํŠธ ์ž‘์„ฑ ์‹œ ์ฃผ์˜ํ•  ์ ๋“ค:

// ์•ˆ์ „ํ•œ ์ปจํŠธ๋ž™ํŠธ ํŒจํ„ด
contract SecureContentRegistry {
    using SafeMath for uint256; // ์˜ค๋ฒ„ํ”Œ๋กœ์šฐ ๋ฐฉ์ง€
    
    address public owner;
    bool public paused; // ๊ธด๊ธ‰ ์ •์ง€ ๊ธฐ๋Šฅ
    
    modifier onlyOwner() {
        require(msg.sender == owner, "Not owner");
        _;
    }
    
    modifier whenNotPaused() {
        require(!paused, "Contract is paused");
        _;
    }
    
    modifier validContentId(uint256 _contentId) {
        require(_contentId > 0 && _contentId <= contentCount, "Invalid ID");
        _;
    }
    
    constructor() {
        owner = msg.sender;
        paused = false;
    }
    
    // ์žฌ์ง„์ž… ๊ณต๊ฒฉ ๋ฐฉ์ง€ ํŒจํ„ด
    bool private locked;
    modifier noReentrant() {
        require(!locked, "No reentrancy");
        locked = true;
        _;
        locked = false;
    }
    
    function registerContent(bytes32 _contentHash)
        external
        whenNotPaused
        noReentrant
        returns (uint256)
    {
        require(_contentHash != bytes32(0), "Invalid hash");
        
        contentCount = contentCount.add(1); // SafeMath ์‚ฌ์šฉ
        
        contents[contentCount] = Content({
            contentHash: _contentHash,
            author: msg.sender,
            timestamp: uint40(block.timestamp),
            isActive: true
        });
        
        emit ContentRegistered(contentCount, msg.sender, _contentHash);
        
        return contentCount;
    }
    
    // ๊ธด๊ธ‰ ์ •์ง€ ๊ธฐ๋Šฅ
    function pause() external onlyOwner {
        paused = true;
    }
    
    function unpause() external onlyOwner {
        paused = false;
    }
    
    // ์†Œ์œ ๊ถŒ ์ด์ „
    function transferOwnership(address newOwner) external onlyOwner {
        require(newOwner != address(0), "Invalid address");
        owner = newOwner;
    }
}

๐Ÿ” ๋ฐฑ์—”๋“œ ๋ณด์•ˆ

๋ผ๋ผ๋ฒจ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์˜ ๋ณด์•ˆ ๊ฐ•ํ™”:

// app/Http/Middleware/VerifyBlockchainSignature.php
namespace App\Http\Middleware;

use Closure;
use Illuminate\Http\Request;

class VerifyBlockchainSignature
{
    public function handle(Request $request, Closure $next)
    {
        // ๋ธ”๋ก์ฒด์ธ ๊ด€๋ จ ์š”์ฒญ์€ ์„œ๋ช… ๊ฒ€์ฆ
        if ($request->is('api/blockchain/*')) {
            $signature = $request->header('X-Signature');
            $address = $request->header('X-Address');
            
            if (!$signature || !$address) {
                return response()->json([
                    'message' => 'Missing signature or address'
                ], 401);
            }
            
            // ์„œ๋ช… ๊ฒ€์ฆ ๋กœ์ง
            if (!$this->verifySignature($request, $signature, $address)) {
                return response()->json([
                    'message' => 'Invalid signature'
                ], 401);
            }
            
            $request->merge(['verified_address' => $address]);
        }
        
        return $next($request);
    }
    
    private function verifySignature($request, $signature, $address)
    {
        // ์‹ค์ œ ์„œ๋ช… ๊ฒ€์ฆ ๊ตฌํ˜„
        return true;
    }
}

Rate Limiting ์ ์šฉ:

// app/Providers/RouteServiceProvider.php
protected function configureRateLimiting()
{
    RateLimiter::for('blockchain', function (Request $request) {
        return Limit::perMinute(10)->by(
            $request->header('X-Address') ?: $request->ip()
        );
    });
}

// routes/api.php
Route::middleware(['auth:sanctum', 'throttle:blockchain'])
    ->group(function () {
        Route::post('/blockchain/register', [BlockchainController::class, 'register']);
    });

๐Ÿ”‘ ํ”„๋ผ์ด๋น— ํ‚ค ๊ด€๋ฆฌ

์ ˆ๋Œ€๋กœ ํ”„๋ผ์ด๋น— ํ‚ค๋ฅผ ์ฝ”๋“œ์— ํ•˜๋“œ์ฝ”๋”ฉํ•˜๋ฉด ์•ˆ ๋ผ! ํ™˜๊ฒฝ ๋ณ€์ˆ˜์™€ ์•”ํ˜ธํ™”๋ฅผ ์‚ฌ์šฉํ•˜์ž:

// .env
BLOCKCHAIN_NETWORK=mainnet
BLOCKCHAIN_RPC_URL=https://mainnet.infura.io/v3/YOUR_PROJECT_ID
BLOCKCHAIN_PRIVATE_KEY=encrypted:xxxxx

// config/blockchain.php
return [
    'network' => env('BLOCKCHAIN_NETWORK', 'testnet'),
    'rpc_url' => env('BLOCKCHAIN_RPC_URL'),
    'private_key' => env('BLOCKCHAIN_PRIVATE_KEY'),
    'contract_address' => env('CONTRACT_ADDRESS'),
    
    'networks' => [
        'mainnet' => [
            'chain_id' => 1,
            'explorer' => 'https://etherscan.io'
        ],
        'goerli' => [
            'chain_id' => 5,
            'explorer' => 'https://goerli.etherscan.io'
        ],
        'polygon' => [
            'chain_id' => 137,
            'explorer' => 'https://polygonscan.com'
        ]
    ]
];

ํ”„๋ผ์ด๋น— ํ‚ค๋Š” Laravel์˜ ์•”ํ˜ธํ™” ๊ธฐ๋Šฅ์„ ์‚ฌ์šฉํ•ด์„œ ์ €์žฅ:

// ์•”ํ˜ธํ™”
$encryptedKey = encrypt($privateKey);

// ๋ณตํ˜ธํ™”
$privateKey = decrypt(config('blockchain.private_key'));
  • โš ๏ธ ๋ณด์•ˆ ์ฒดํฌ๋ฆฌ์ŠคํŠธ:
  • โŒ ํ”„๋ผ์ด๋น— ํ‚ค๋ฅผ ์ฝ”๋“œ์— ํ•˜๋“œ์ฝ”๋”ฉํ•˜์ง€ ๋ง ๊ฒƒ
  • โŒ ํ”„๋ก ํŠธ์—”๋“œ์—์„œ ๋ฏผ๊ฐํ•œ ๋กœ์ง ์ฒ˜๋ฆฌํ•˜์ง€ ๋ง ๊ฒƒ
  • โŒ ์‚ฌ์šฉ์ž ์ž…๋ ฅ์„ ๊ฒ€์ฆ ์—†์ด ์ปจํŠธ๋ž™ํŠธ์— ์ „๋‹ฌํ•˜์ง€ ๋ง ๊ฒƒ
  • โœ… ๋ชจ๋“  ํŠธ๋žœ์žญ์…˜์— ๊ฐ€์Šค ๋ฆฌ๋ฏธํŠธ ์„ค์ •
  • โœ… ์Šค๋งˆํŠธ ์ปจํŠธ๋ž™ํŠธ ๊ฐ์‚ฌ(Audit) ๋ฐ›๊ธฐ
  • โœ… ํ…Œ์ŠคํŠธ๋„ท์—์„œ ์ถฉ๋ถ„ํžˆ ํ…Œ์ŠคํŠธ ํ›„ ๋ฉ”์ธ๋„ท ๋ฐฐํฌ
  • โœ… ๋ฉ€ํ‹ฐ์‹œ๊ทธ ์ง€๊ฐ‘ ์‚ฌ์šฉ ๊ณ ๋ ค

๐Ÿงช ํ…Œ์ŠคํŠธ ์ „๋žต

๋ธ”๋ก์ฒด์ธ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์€ ํ…Œ์ŠคํŠธ๊ฐ€ ํŠนํžˆ ์ค‘์š”ํ•ด. ๋ฉ”์ธ๋„ท์— ๋ฐฐํฌํ•˜๋ฉด ์ˆ˜์ •์ด ์–ด๋ ต๊ณ  ์‹ค์ˆ˜๊ฐ€ ํฐ ๋น„์šฉ์œผ๋กœ ์ด์–ด์งˆ ์ˆ˜ ์žˆ๊ฑฐ๋“ !

๐Ÿ”ฌ ์Šค๋งˆํŠธ ์ปจํŠธ๋ž™ํŠธ ํ…Œ์ŠคํŠธ

Hardhat์„ ์‚ฌ์šฉํ•œ ์ปจํŠธ๋ž™ํŠธ ํ…Œ์ŠคํŠธ:

// test/ContentRegistry.test.js
const { expect } = require("chai");
const { ethers } = require("hardhat");

describe("ContentRegistry", function () {
    let contentRegistry;
    let owner;
    let addr1;
    let addr2;
    
    beforeEach(async function () {
        [owner, addr1, addr2] = await ethers.getSigners();
        
        const ContentRegistry = await ethers.getContractFactory("ContentRegistry");
        contentRegistry = await ContentRegistry.deploy();
        await contentRegistry.deployed();
    });
    
    describe("Content Registration", function () {
        it("Should register content successfully", async function () {
            const contentHash = ethers.utils.formatBytes32String("test-hash");
            const title = "Test Content";
            
            await expect(
                contentRegistry.connect(addr1).registerContent(contentHash, title)
            )
                .to.emit(contentRegistry, "ContentRegistered")
                .withArgs(1, addr1.address, contentHash, anyValue);
            
            const content = await contentRegistry.getContent(1);
            expect(content[0]).to.equal(contentHash);
            expect(content[1]).to.equal(addr1.address);
        });
        
        it("Should increment content count", async function () {
            const hash1 = ethers.utils.formatBytes32String("hash1");
            const hash2 = ethers.utils.formatBytes32String("hash2");
            
            await contentRegistry.registerContent(hash1, "Title 1");
            await contentRegistry.registerContent(hash2, "Title 2");
            
            const count = await contentRegistry.contentCount();
            expect(count).to.equal(2);
        });
        
        it("Should track author contents", async function () {
            const hash1 = ethers.utils.formatBytes32String("hash1");
            const hash2 = ethers.utils.formatBytes32String("hash2");
            
            await contentRegistry.connect(addr1).registerContent(hash1, "Title 1");
            await contentRegistry.connect(addr1).registerContent(hash2, "Title 2");
            
            const authorContents = await contentRegistry.getAuthorContents(addr1.address);
            expect(authorContents.length).to.equal(2);
        });
    });
    
    describe("Content Update", function () {
        it("Should allow author to update content", async function () {
            const originalHash = ethers.utils.formatBytes32String("original");
            const newHash = ethers.utils.formatBytes32String("updated");
            
            await contentRegistry.connect(addr1).registerContent(originalHash, "Title");
            
            await expect(
                contentRegistry.connect(addr1).updateContent(1, newHash)
            )
                .to.emit(contentRegistry, "ContentUpdated")
                .withArgs(1, newHash);
            
            const content = await contentRegistry.getContent(1);
            expect(content[0]).to.equal(newHash);
        });
        
        it("Should reject update from non-author", async function () {
            const hash = ethers.utils.formatBytes32String("hash");
            const newHash = ethers.utils.formatBytes32String("new");
            
            await contentRegistry.connect(addr1).registerContent(hash, "Title");
            
            await expect(
                contentRegistry.connect(addr2).updateContent(1, newHash)
            ).to.be.revertedWith("Only author can update");
        });
    });
});

ํ…Œ์ŠคํŠธ ์‹คํ–‰:

npx hardhat test
npx hardhat coverage

๐Ÿงฉ ๋ผ๋ผ๋ฒจ ํ†ตํ•ฉ ํ…Œ์ŠคํŠธ

PHPUnit์„ ์‚ฌ์šฉํ•œ API ํ…Œ์ŠคํŠธ:

// tests/Feature/ContentApiTest.php
namespace Tests\Feature;

use Tests\TestCase;
use App\Models\User;
use App\Models\Content;
use Illuminate\Foundation\Testing\RefreshDatabase;

class ContentApiTest extends TestCase
{
    use RefreshDatabase;
    
    protected $user;
    
    protected function setUp(): void
    {
        parent::setUp();
        
        $this->user = User::factory()->create([
            'wallet_address' => '0x1234567890123456789012345678901234567890'
        ]);
    }
    
    public function test_can_create_content()
    {
        $response = $this->actingAs($this->user, 'sanctum')
            ->postJson('/api/contents', [
                'title' => 'Test Content',
                'content' => 'This is test content',
                'hash' => hash('sha256', 'This is test content')
            ]);
        
        $response->assertStatus(201)
            ->assertJsonStructure([
                'id',
                'title',
                'content',
                'hash',
                'user_id'
            ]);
        
        $this->assertDatabaseHas('contents', [
            'title' => 'Test Content',
            'user_id' => $this->user->id
        ]);
    }
    
    public function test_can_list_contents()
    {
        Content::factory()->count(5)->create([
            'user_id' => $this->user->id,
            'status' => 'published'
        ]);
        
        $response = $this->getJson('/api/contents');
        
        $response->assertStatus(200)
            ->assertJsonCount(5, 'data');
    }
    
    public function test_can_verify_content_hash()
    {
        $originalContent = 'Original content';
        $hash = hash('sha256', $originalContent);
        
        $content = Content::factory()->create([
            'user_id' => $this->user->id,
            'content' => $originalContent,
            'hash' => $hash
        ]);
        
        $response = $this->postJson("/api/contents/{$content->id}/verify", [
            'content' => $originalContent
        ]);
        
        $response->assertStatus(200)
            ->assertJson([
                'is_valid' => true
            ]);
    }
    
    public function test_cannot_update_others_content()
    {
        $otherUser = User::factory()->create();
        $content = Content::factory()->create([
            'user_id' => $otherUser->id
        ]);
        
        $response = $this->actingAs($this->user, 'sanctum')
            ->patchJson("/api/contents/{$content->id}", [
                'title' => 'Updated Title'
            ]);
        
        $response->assertStatus(403);
    }
}

ํ…Œ์ŠคํŠธ ์‹คํ–‰:

php artisan test
php artisan test --coverage
๐Ÿ’ก ํ…Œ์ŠคํŠธ ํŒ: โ€ข ๋กœ์ปฌ ๋ธ”๋ก์ฒด์ธ(Ganache)์„ ์‚ฌ์šฉํ•ด์„œ ๋น ๋ฅด๊ฒŒ ํ…Œ์ŠคํŠธ
โ€ข ํ…Œ์ŠคํŠธ๋„ท(Goerli, Sepolia)์—์„œ ์‹ค์ œ ํ™˜๊ฒฝ ํ…Œ์ŠคํŠธ
โ€ข CI/CD ํŒŒ์ดํ”„๋ผ์ธ์— ์ž๋™ ํ…Œ์ŠคํŠธ ํ†ตํ•ฉ
โ€ข ๊ฐ€์Šค๋น„ ์ถ”์ • ํ…Œ์ŠคํŠธ๋„ ํฌํ•จ
โ€ข ์—ฃ์ง€ ์ผ€์ด์Šค์™€ ์‹คํŒจ ์‹œ๋‚˜๋ฆฌ์˜ค๋„ ๊ผญ ํ…Œ์ŠคํŠธ! ๐ŸŽฏ

๐Ÿš€ ๋ฐฐํฌ ๋ฐ ์šด์˜

๊ฐœ๋ฐœ์ด ๋๋‚ฌ๋‹ค๋ฉด ์ด์ œ ์‹ค์ œ ํ™˜๊ฒฝ์— ๋ฐฐํฌํ•  ์ฐจ๋ก€์•ผ! ๋‹จ๊ณ„๋ณ„๋กœ ์•ˆ์ „ํ•˜๊ฒŒ ๋ฐฐํฌํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์•Œ์•„๋ณด์ž.

1๏ธโƒฃ ํ…Œ์ŠคํŠธ๋„ท ๋ฐฐํฌ

๋จผ์ € Goerli๋‚˜ Sepolia ๊ฐ™์€ ํ…Œ์ŠคํŠธ๋„ท์— ๋ฐฐํฌํ•ด์„œ ๊ฒ€์ฆํ•ด:

// hardhat.config.js
module.exports = {
    networks: {
        goerli: {
            url: process.env.GOERLI_RPC_URL,
            accounts: [process.env.PRIVATE_KEY],
            chainId: 5
        },
        sepolia: {
            url: process.env.SEPOLIA_RPC_URL,
            accounts: [process.env.PRIVATE_KEY],
            chainId: 11155111
        }
    },
    etherscan: {
        apiKey: process.env.ETHERSCAN_API_KEY
    }
};

// ๋ฐฐํฌ ๋ช…๋ น์–ด
npx hardhat run scripts/deploy.js --network goerli

// ์ปจํŠธ๋ž™ํŠธ ๊ฒ€์ฆ
npx hardhat verify --network goerli DEPLOYED_CONTRACT_ADDRESS

2๏ธโƒฃ ๋ผ๋ผ๋ฒจ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๋ฐฐํฌ

์„œ๋ฒ„ ํ™˜๊ฒฝ ์„ค์ •:

# .env.production
APP_ENV=production
APP_DEBUG=false
APP_URL=https://your-domain.com

DB_CONNECTION=mysql
DB_HOST=your-db-host
DB_DATABASE=your-database
DB_USERNAME=your-username
DB_PASSWORD=your-password

BLOCKCHAIN_NETWORK=mainnet
BLOCKCHAIN_RPC_URL=https://mainnet.infura.io/v3/YOUR_PROJECT_ID
CONTRACT_ADDRESS=0xYourContractAddress

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

QUEUE_CONNECTION=redis

๋ฐฐํฌ ์Šคํฌ๋ฆฝํŠธ:

#!/bin/bash
# deploy.sh

echo "Starting deployment..."

# Git pull
git pull origin main

# Install dependencies
composer install --no-dev --optimize-autoloader
npm install --production
npm run production

# Run migrations
php artisan migrate --force

# Clear and cache
php artisan config:cache
php artisan route:cache
php artisan view:cache

# Restart queue workers
php artisan queue:restart

# Restart services
sudo systemctl restart php8.1-fpm
sudo systemctl restart nginx

echo "Deployment completed!"

3๏ธโƒฃ ๋ฉ”์ธ๋„ท ๋ฐฐํฌ

ํ…Œ์ŠคํŠธ๊ฐ€ ์™„๋ฃŒ๋˜๋ฉด ๋ฉ”์ธ๋„ท์— ๋ฐฐํฌ:

// ๋ฉ”์ธ๋„ท ๋ฐฐํฌ ์ „ ์ฒดํฌ๋ฆฌ์ŠคํŠธ
โœ… ์Šค๋งˆํŠธ ์ปจํŠธ๋ž™ํŠธ ๊ฐ์‚ฌ ์™„๋ฃŒ
โœ… ํ…Œ์ŠคํŠธ๋„ท์—์„œ ์ถฉ๋ถ„ํ•œ ํ…Œ์ŠคํŠธ ์™„๋ฃŒ
โœ… ๊ฐ€์Šค๋น„ ์ตœ์ ํ™” ํ™•์ธ
โœ… ๊ธด๊ธ‰ ์ •์ง€ ๊ธฐ๋Šฅ ํ…Œ์ŠคํŠธ
โœ… ๋ฐฑ์—… ๋ฐ ๋กค๋ฐฑ ๊ณ„ํš ์ˆ˜๋ฆฝ

// ๋ฐฐํฌ
npx hardhat run scripts/deploy.js --network mainnet

// ๊ฒ€์ฆ
npx hardhat verify --network mainnet DEPLOYED_CONTRACT_ADDRESS

๐Ÿ“Š ๋ชจ๋‹ˆํ„ฐ๋ง ์„ค์ •

์šด์˜ ์ค‘ ์‹œ์Šคํ…œ์„ ๋ชจ๋‹ˆํ„ฐ๋งํ•˜๋Š” ๊ฑด ํ•„์ˆ˜์•ผ:

// app/Services/BlockchainMonitorService.php
namespace App\Services;

use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Cache;

class BlockchainMonitorService
{
    public function checkContractHealth()
    {
        try {
            // ์ปจํŠธ๋ž™ํŠธ ์‘๋‹ต ์‹œ๊ฐ„ ์ฒดํฌ
            $startTime = microtime(true);
            $contentCount = $this->getContentCount();
            $responseTime = (microtime(true) - $startTime) * 1000;
            
            // ๋ฉ”ํŠธ๋ฆญ ๊ธฐ๋ก
            $this->recordMetric('contract_response_time', $responseTime);
            
            // ๊ฐ€์Šค ๊ฐ€๊ฒฉ ๋ชจ๋‹ˆํ„ฐ๋ง
            $gasPrice = $this->getCurrentGasPrice();
            $this->recordMetric('gas_price', $gasPrice);
            
            // ์•Œ๋ฆผ ์กฐ๊ฑด ์ฒดํฌ
            if ($responseTime > 5000) {
                $this->sendAlert('High contract response time: ' . $responseTime . 'ms');
            }
            
            if ($gasPrice > 100) {
                $this->sendAlert('High gas price: ' . $gasPrice . ' gwei');
            }
            
            return [
                'status' => 'healthy',
                'response_time' => $responseTime,
                'gas_price' => $gasPrice,
                'content_count' => $contentCount
            ];
            
        } catch (\Exception $e) {
            Log::error('Blockchain health check failed', [
                'error' => $e->getMessage()
            ]);
            
            $this->sendAlert('Blockchain health check failed: ' . $e->getMessage());
            
            return [
                'status' => 'unhealthy',
                'error' => $e->getMessage()
            ];
        }
    }
    
    private function recordMetric($name, $value)
    {
        // ๋ฉ”ํŠธ๋ฆญ์„ ์‹œ๊ณ„์—ด ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค์— ์ €์žฅ
        // InfluxDB, Prometheus ๋“ฑ ์‚ฌ์šฉ
    }
    
    private function sendAlert($message)
    {
        // Slack, Discord, ์ด๋ฉ”์ผ ๋“ฑ์œผ๋กœ ์•Œ๋ฆผ ์ „์†ก
        Log::alert($message);
    }
    
    private function getContentCount()
    {
        // ์‹ค์ œ ์ปจํŠธ๋ž™ํŠธ ์กฐํšŒ
        return 0;
    }
    
    private function getCurrentGasPrice()
    {
        // ํ˜„์žฌ ๊ฐ€์Šค ๊ฐ€๊ฒฉ ์กฐํšŒ
        return 0;
    }
}

// ์Šค์ผ€์ค„๋Ÿฌ์— ๋“ฑ๋ก
// app/Console/Kernel.php
protected function schedule(Schedule $schedule)
{
    $schedule->call(function () {
        app(BlockchainMonitorService::class)->checkContractHealth();
    })->everyFiveMinutes();
}
โš ๏ธ ์šด์˜ ์‹œ ์ฃผ์˜์‚ฌํ•ญ: โ€ข ๋ฉ”์ธ๋„ท ๋ฐฐํฌ ์ „ ๋ฐ˜๋“œ์‹œ ๊ฐ์‚ฌ(Audit) ๋ฐ›๊ธฐ
โ€ข ์ถฉ๋ถ„ํ•œ ETH๋ฅผ ํ™•๋ณดํ•ด์„œ ๊ฐ€์Šค๋น„ ๋ถ€์กฑ ๋ฐฉ์ง€
โ€ข ์ปจํŠธ๋ž™ํŠธ ์—…๊ทธ๋ ˆ์ด๋“œ ์ „๋žต ์ˆ˜๋ฆฝ (Proxy ํŒจํ„ด ๊ณ ๋ ค)
โ€ข ์ •๊ธฐ์ ์ธ ๋ฐฑ์—… ๋ฐ ๋ชจ๋‹ˆํ„ฐ๋ง
โ€ข ๊ธด๊ธ‰ ์ƒํ™ฉ ๋Œ€์‘ ๋งค๋‰ด์–ผ ์ค€๋น„

๐ŸŽฏ ์‹ค์ „ ํ™œ์šฉ ์‚ฌ๋ก€

์ด๋ก ์€ ์ถฉ๋ถ„ํžˆ ๋ฐฐ์› ์œผ๋‹ˆ ์ด์ œ ์‹ค์ œ๋กœ ์–ด๋–ป๊ฒŒ ํ™œ์šฉํ•  ์ˆ˜ ์žˆ๋Š”์ง€ ์•Œ์•„๋ณด์ž! ๋ธ”๋ก์ฒด์ธ CMS๋Š” ๋‹ค์–‘ํ•œ ๋ถ„์•ผ์—์„œ ํ˜์‹ ์„ ๋งŒ๋“ค์–ด๋‚ผ ์ˆ˜ ์žˆ์–ด. ๐ŸŒŸ

๐Ÿ“ฐ ํƒˆ์ค‘์•™ํ™” ๋‰ด์Šค ํ”Œ๋žซํผ

๊ธฐ์‚ฌ์˜ ์›๋ณธ์„ ๋ธ”๋ก์ฒด์ธ์— ๊ธฐ๋กํ•ด์„œ ๊ฒ€์—ด ์ €ํ•ญ์„ฑ๊ณผ ์ง„์œ„ ๊ฒ€์ฆ์ด ๊ฐ€๋Šฅํ•œ ๋‰ด์Šค ํ”Œ๋žซํผ์„ ๋งŒ๋“ค ์ˆ˜ ์žˆ์–ด:

โ€ข ๊ธฐ์ž๊ฐ€ ๊ธฐ์‚ฌ๋ฅผ ์ž‘์„ฑํ•˜๋ฉด ํ•ด์‹œ๊ฐ€ ๋ธ”๋ก์ฒด์ธ์— ๊ธฐ๋ก๋ผ
โ€ข ๋ˆ„๊ตฌ๋‚˜ ์›๋ณธ ๊ธฐ์‚ฌ์˜ ์ง„์œ„๋ฅผ ๊ฒ€์ฆํ•  ์ˆ˜ ์žˆ์–ด
โ€ข ์ˆ˜์ • ์ด๋ ฅ์ด ํˆฌ๋ช…ํ•˜๊ฒŒ ๊ณต๊ฐœ๋ผ
โ€ข ๋…์ž๋“ค์ด ํ† ํฐ์œผ๋กœ ์ข‹์€ ๊ธฐ์‚ฌ์— ๋ณด์ƒํ•  ์ˆ˜ ์žˆ์–ด

์ด๋Ÿฐ ์‹œ์Šคํ…œ์€ ๊ฐ€์งœ ๋‰ด์Šค ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๊ณ  ์–ธ๋ก ์˜ ์‹ ๋ขฐ์„ฑ์„ ๋†’์ผ ์ˆ˜ ์žˆ์ง€! ๐Ÿ“ฐ

๐ŸŽจ NFT ๊ธฐ๋ฐ˜ ๋””์ง€ํ„ธ ์•„ํŠธ ๊ฐค๋Ÿฌ๋ฆฌ

์ž‘ํ’ˆ์˜ ์†Œ์œ ๊ถŒ๊ณผ ๊ฑฐ๋ž˜ ์ด๋ ฅ์„ ๋ธ”๋ก์ฒด์ธ์— ๊ธฐ๋กํ•˜๋Š” ์•„ํŠธ ํ”Œ๋žซํผ:

โ€ข ์ž‘๊ฐ€๊ฐ€ ์ž‘ํ’ˆ์„ ์—…๋กœ๋“œํ•˜๋ฉด ์ž๋™์œผ๋กœ NFT ๋ฐœํ–‰
โ€ข ์ž‘ํ’ˆ์˜ ์ง„ํ’ˆ ์—ฌ๋ถ€๋ฅผ ๋ธ”๋ก์ฒด์ธ์œผ๋กœ ๊ฒ€์ฆ
โ€ข 2์ฐจ ํŒ๋งค ์‹œ ์ž‘๊ฐ€์—๊ฒŒ ๋กœ์—ดํ‹ฐ ์ž๋™ ์ง€๊ธ‰
โ€ข ์ž‘ํ’ˆ์˜ ์ „์ฒด ์†Œ์œ ๊ถŒ ์ด๋ ฅ ์ถ”์  ๊ฐ€๋Šฅ

๋ผ๋ผ๋ฒจ๋กœ ๊ฐค๋Ÿฌ๋ฆฌ UI๋ฅผ ๋งŒ๋“ค๊ณ , web3.js๋กœ NFT ๊ฑฐ๋ž˜๋ฅผ ์ฒ˜๋ฆฌํ•˜๋ฉด ์™„๋ฒฝํ•œ ๋””์ง€ํ„ธ ์•„ํŠธ ๋งˆ์ผ“ํ”Œ๋ ˆ์ด์Šค๊ฐ€ ์™„์„ฑ๋ผ! ๐ŸŽจ

๐Ÿ“š ํ•™์ˆ  ๋…ผ๋ฌธ ์ €์žฅ์†Œ

๋…ผ๋ฌธ์˜ ์ถœํŒ ์‹œ์ ๊ณผ ์ €์ž๋ฅผ ๋ธ”๋ก์ฒด์ธ์— ๊ธฐ๋กํ•ด์„œ ํ‘œ์ ˆ์„ ๋ฐฉ์ง€ํ•˜๊ณ  ์„ ํ–‰ ์—ฐ๊ตฌ๋ฅผ ์ฆ๋ช…ํ•  ์ˆ˜ ์žˆ์–ด:

โ€ข ์—ฐ๊ตฌ์ž๊ฐ€ ๋…ผ๋ฌธ์„ ์ œ์ถœํ•˜๋ฉด ํƒ€์ž„์Šคํƒฌํ”„์™€ ํ•จ๊ป˜ ๋ธ”๋ก์ฒด์ธ์— ๊ธฐ๋ก
โ€ข ๋…ผ๋ฌธ์˜ ์›๋ณธ์„ฑ๊ณผ ์ถœํŒ ์‹œ์ ์„ ๋ˆ„๊ตฌ๋‚˜ ๊ฒ€์ฆ ๊ฐ€๋Šฅ
โ€ข ๋™๋ฃŒ ํ‰๊ฐ€(Peer Review) ๊ณผ์ •๋„ ํˆฌ๋ช…ํ•˜๊ฒŒ ๊ธฐ๋ก
โ€ข ์ธ์šฉ ๊ด€๊ณ„๋ฅผ ์Šค๋งˆํŠธ ์ปจํŠธ๋ž™ํŠธ๋กœ ์ž๋™ ์ถ”์ 

ํ•™์ˆ  ์ปค๋ฎค๋‹ˆํ‹ฐ์˜ ํˆฌ๋ช…์„ฑ๊ณผ ์‹ ๋ขฐ์„ฑ์„ ํฌ๊ฒŒ ํ–ฅ์ƒ์‹œํ‚ฌ ์ˆ˜ ์žˆ์–ด! ๐Ÿ“š

๐ŸŽต ์Œ์•… ์ €์ž‘๊ถŒ ๊ด€๋ฆฌ ํ”Œ๋žซํผ

์Œ์•…์˜ ์ €์ž‘๊ถŒ๊ณผ ์ˆ˜์ต ๋ถ„๋ฐฐ๋ฅผ ์Šค๋งˆํŠธ ์ปจํŠธ๋ž™ํŠธ๋กœ ์ž๋™ํ™”:

โ€ข ์Œ์•…๊ฐ€๊ฐ€ ๊ณก์„ ๋“ฑ๋กํ•˜๋ฉด ์ €์ž‘๊ถŒ์ด ๋ธ”๋ก์ฒด์ธ์— ๊ธฐ๋ก
โ€ข ์ŠคํŠธ๋ฆฌ๋ฐ ์ˆ˜์ต์ด ์ž๋™์œผ๋กœ ๊ถŒ๋ฆฌ์ž๋“ค์—๊ฒŒ ๋ถ„๋ฐฐ
โ€ข ์ƒ˜ํ”Œ๋ง์ด๋‚˜ ๋ฆฌ๋ฏน์Šค ๊ถŒํ•œ์„ ํ† ํฐ์œผ๋กœ ๊ฑฐ๋ž˜
โ€ข ๋ชจ๋“  ์ˆ˜์ต ๋ถ„๋ฐฐ ๋‚ด์—ญ์ด ํˆฌ๋ช…ํ•˜๊ฒŒ ๊ณต๊ฐœ

์ค‘๊ฐ„ ์—…์ฒด ์—†์ด ์•„ํ‹ฐ์ŠคํŠธ๊ฐ€ ์ง์ ‘ ์ˆ˜์ต์„ ๋ฐ›์„ ์ˆ˜ ์žˆ์–ด์„œ ์Œ์•… ์‚ฐ์—…์„ ํ˜์‹ ํ•  ์ˆ˜ ์žˆ์ง€! ๐ŸŽต

๐Ÿ’ก ์žฌ๋Šฅ๋„ท ํ™œ์šฉ ์•„์ด๋””์–ด: ์žฌ๋Šฅ๋„ท(https://www.jaenung.net) ๊ฐ™์€ ์žฌ๋Šฅ ๊ณต์œ  ํ”Œ๋žซํผ์—์„œ๋„ ๋ธ”๋ก์ฒด์ธ CMS๋ฅผ ํ™œ์šฉํ•  ์ˆ˜ ์žˆ์–ด! ์˜ˆ๋ฅผ ๋“ค์–ด ์ „๋ฌธ๊ฐ€๋“ค์ด ์ž‘์„ฑํ•œ ์ง€์‹ ์ฝ˜ํ…์ธ ์˜ ์›๋ณธ์„ ๋ธ”๋ก์ฒด์ธ์— ๊ธฐ๋กํ•˜๋ฉด, ์ฝ˜ํ…์ธ ์˜ ์ง„์œ„์„ฑ์„ ๋ณด์žฅํ•˜๊ณ  ์ €์ž‘๊ถŒ์„ ๋ณดํ˜ธํ•  ์ˆ˜ ์žˆ์ง€. ๋˜ํ•œ ์ฝ˜ํ…์ธ  ๊ตฌ๋งค ์ด๋ ฅ์„ ๋ธ”๋ก์ฒด์ธ์— ๊ธฐ๋กํ•ด์„œ ํˆฌ๋ช…ํ•œ ์ˆ˜์ต ๋ถ„๋ฐฐ ์‹œ์Šคํ…œ์„ ๋งŒ๋“ค ์ˆ˜๋„ ์žˆ์–ด! ๐ŸŽฏ

๐Ÿ”ฎ ๋ฏธ๋ž˜ ์ „๋ง๊ณผ ๋ฐœ์ „ ๋ฐฉํ–ฅ

๋ธ”๋ก์ฒด์ธ CMS ๊ธฐ์ˆ ์€ ๊ณ„์† ๋ฐœ์ „ํ•˜๊ณ  ์žˆ์–ด. ์•ž์œผ๋กœ ์–ด๋–ค ๋ฐฉํ–ฅ์œผ๋กœ ๋‚˜์•„๊ฐˆ์ง€ ์‚ดํŽด๋ณด์ž!

โšก ๋ ˆ์ด์–ด2 ์†”๋ฃจ์…˜ ํ†ตํ•ฉ

์ด๋”๋ฆฌ์›€ ๋ฉ”์ธ๋„ท์˜ ๋†’์€ ๊ฐ€์Šค๋น„ ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•ด ๋ ˆ์ด์–ด2 ์†”๋ฃจ์…˜๋“ค์ด ์ฃผ๋ชฉ๋ฐ›๊ณ  ์žˆ์–ด:

Polygon (Matic): ์ €๋ ดํ•œ ์ˆ˜์ˆ˜๋ฃŒ์™€ ๋น ๋ฅธ ํŠธ๋žœ์žญ์…˜
Arbitrum: ์ด๋”๋ฆฌ์›€๊ณผ ๋†’์€ ํ˜ธํ™˜์„ฑ
Optimism: ๊ฐ„๋‹จํ•œ ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜
zkSync: ์˜์ง€์‹ ์ฆ๋ช… ๊ธฐ๋ฐ˜ ๋ณด์•ˆ

๋ผ๋ผ๋ฒจ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์—์„œ ์—ฌ๋Ÿฌ ์ฒด์ธ์„ ๋™์‹œ์— ์ง€์›ํ•˜๋Š” ๋ฉ€ํ‹ฐ์ฒด์ธ ์•„ํ‚คํ…์ฒ˜๋ฅผ ๊ตฌํ˜„ํ•  ์ˆ˜ ์žˆ์–ด! ๐ŸŒ‰

๐Ÿค– AI์™€์˜ ๊ฒฐํ•ฉ

์ธ๊ณต์ง€๋Šฅ๊ณผ ๋ธ”๋ก์ฒด์ธ์„ ๊ฒฐํ•ฉํ•˜๋ฉด ๋” ๊ฐ•๋ ฅํ•œ CMS๋ฅผ ๋งŒ๋“ค ์ˆ˜ ์žˆ์–ด:

โ€ข AI๊ฐ€ ์ฝ˜ํ…์ธ ์˜ ํ’ˆ์งˆ์„ ์ž๋™ ํ‰๊ฐ€
โ€ข ํ‘œ์ ˆ ๊ฐ์ง€ AI์™€ ๋ธ”๋ก์ฒด์ธ ๊ฒ€์ฆ ๊ฒฐํ•ฉ
โ€ข ๊ฐœ์ธํ™”๋œ ์ฝ˜ํ…์ธ  ์ถ”์ฒœ + ํˆฌ๋ช…ํ•œ ์•Œ๊ณ ๋ฆฌ์ฆ˜
โ€ข AI ์ƒ์„ฑ ์ฝ˜ํ…์ธ ์˜ ์›๋ณธ ์ฆ๋ช…

๋ผ๋ผ๋ฒจ์—์„œ OpenAI API๋ฅผ ํ†ตํ•ฉํ•˜๊ณ , ๊ฒฐ๊ณผ๋ฅผ ๋ธ”๋ก์ฒด์ธ์— ๊ธฐ๋กํ•˜๋Š” ๋ฐฉ์‹์œผ๋กœ ๊ตฌํ˜„ํ•  ์ˆ˜ ์žˆ์ง€! ๐Ÿค–

๐ŸŒ ํƒˆ์ค‘์•™ํ™” ์‹ ์› ์ธ์ฆ (DID)

์ „ํ†ต์ ์ธ ์ด๋ฉ”์ผ/๋น„๋ฐ€๋ฒˆํ˜ธ ์ธ์ฆ ๋Œ€์‹  ํƒˆ์ค‘์•™ํ™” ์‹ ์›์„ ์‚ฌ์šฉ:

โ€ข ์‚ฌ์šฉ์ž๊ฐ€ ์ž์‹ ์˜ ๋ฐ์ดํ„ฐ๋ฅผ ์™„์ „ํžˆ ํ†ต์ œ
โ€ข ์—ฌ๋Ÿฌ ํ”Œ๋žซํผ์—์„œ ํ•˜๋‚˜์˜ ์‹ ์›์œผ๋กœ ๋กœ๊ทธ์ธ
โ€ข ๊ฐœ์ธ์ •๋ณด ์œ ์ถœ ์œ„ํ—˜ ์ตœ์†Œํ™”
โ€ข ๊ฒ€์ฆ ๊ฐ€๋Šฅํ•œ ์ž๊ฒฉ์ฆ๋ช…(Verifiable Credentials)

๋ผ๋ผ๋ฒจ์— DID ์ธ์ฆ์„ ํ†ตํ•ฉํ•˜๋ฉด ๋” ์•ˆ์ „ํ•˜๊ณ  ์‚ฌ์šฉ์ž ์นœํ™”์ ์ธ ์‹œ์Šคํ…œ์„ ๋งŒ๋“ค ์ˆ˜ ์žˆ์–ด! ๐Ÿ”

๐Ÿ’ฐ ํ† ํฐ ์ด์ฝ”๋…ธ๋ฏธ ์„ค๊ณ„

ํ”Œ๋žซํผ ์ž์ฒด ํ† ํฐ์„ ๋ฐœํ–‰ํ•ด์„œ ์ƒํƒœ๊ณ„๋ฅผ ํ™œ์„ฑํ™”:

โ€ข ์ข‹์€ ์ฝ˜ํ…์ธ  ์ž‘์„ฑ์ž์—๊ฒŒ ํ† ํฐ ๋ณด์ƒ
โ€ข ํ๋ ˆ์ด์…˜ ์ฐธ์—ฌ์ž์—๊ฒŒ ์ธ์„ผํ‹ฐ๋ธŒ ์ œ๊ณต
โ€ข ๊ฑฐ๋ฒ„๋„Œ์Šค ํˆฌํ‘œ๋กœ ํ”Œ๋žซํผ ์šด์˜ ๊ฒฐ์ •
โ€ข ์Šคํ…Œ์ดํ‚น์œผ๋กœ ์žฅ๊ธฐ ์ฐธ์—ฌ ์œ ๋„

ERC-20 ํ† ํฐ์„ ๋ฐœํ–‰ํ•˜๊ณ  ๋ผ๋ผ๋ฒจ์—์„œ ํ† ํฐ ์ด์ฝ”๋…ธ๋ฏธ๋ฅผ ๊ด€๋ฆฌํ•˜๋Š” ์‹œ์Šคํ…œ์„ ๊ตฌ์ถ•ํ•  ์ˆ˜ ์žˆ์–ด! ๐Ÿ’Ž

๐ŸŽ“ ํ•™์Šต ๋ฆฌ์†Œ์Šค ๋ฐ ์ปค๋ฎค๋‹ˆํ‹ฐ

๋ธ”๋ก์ฒด์ธ ๊ฐœ๋ฐœ์„ ๊ณ„์† ๊ณต๋ถ€ํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด ์ด๋Ÿฐ ๋ฆฌ์†Œ์Šค๋“ค์„ ํ™œ์šฉํ•ด๋ด!

๐Ÿ“– ๊ณต์‹ ๋ฌธ์„œ

โ€ข Laravel: https://laravel.com/docs
โ€ข Web3.js: https://web3js.readthedocs.io
โ€ข Solidity: https://docs.soliditylang.org
โ€ข Hardhat: https://hardhat.org/docs
โ€ข IPFS: https://docs.ipfs.tech

๐ŸŽฏ ์˜จ๋ผ์ธ ๊ฐ•์˜

โ€ข CryptoZombies: ๊ฒŒ์ž„์œผ๋กœ ๋ฐฐ์šฐ๋Š” ์†”๋ฆฌ๋””ํ‹ฐ
โ€ข Buildspace: Web3 ํ”„๋กœ์ ํŠธ ์‹ค์Šต
โ€ข Alchemy University: ๋ฌด๋ฃŒ ๋ธ”๋ก์ฒด์ธ ๊ฐœ๋ฐœ ๊ณผ์ •
โ€ข Udemy: ๋ผ๋ผ๋ฒจ + ๋ธ”๋ก์ฒด์ธ ํ†ตํ•ฉ ๊ฐ•์˜

๐Ÿ‘ฅ ์ปค๋ฎค๋‹ˆํ‹ฐ

โ€ข Ethereum Stack Exchange: ๊ธฐ์ˆ  ์งˆ๋ฌธ
โ€ข Laravel Korea: ํ•œ๊ตญ ๋ผ๋ผ๋ฒจ ์ปค๋ฎค๋‹ˆํ‹ฐ
โ€ข Web3 Korea: ํ•œ๊ตญ Web3 ๊ฐœ๋ฐœ์ž ๋ชจ์ž„
โ€ข Discord/Telegram: ๋‹ค์–‘ํ•œ ํ”„๋กœ์ ํŠธ ์ฑ„๋„

๐Ÿ’ก ํ•™์Šต ํŒ: ์ด๋ก ๋งŒ ๊ณต๋ถ€ํ•˜์ง€ ๋ง๊ณ  ์ง์ ‘ ์ž‘์€ ํ”„๋กœ์ ํŠธ๋ฅผ ๋งŒ๋“ค์–ด๋ณด๋Š” ๊ฒŒ ๊ฐ€์žฅ ํšจ๊ณผ์ ์ด์•ผ! ํ…Œ์ŠคํŠธ๋„ท์—์„œ ์‹คํ—˜ํ•˜๋ฉด ๋น„์šฉ๋„ ๋“ค์ง€ ์•Š์œผ๋‹ˆ๊นŒ ๋งˆ์Œ๊ป ์‹œ๋„ํ•ด๋ด. ์‹ค์ˆ˜ํ•˜๋ฉด์„œ ๋ฐฐ์šฐ๋Š” ๊ฒŒ ๊ฐ€์žฅ ๋น ๋ฅธ ํ•™์Šต ๋ฐฉ๋ฒ•์ด์•ผ! ๐Ÿš€

๐ŸŽฌ ๋งˆ๋ฌด๋ฆฌํ•˜๋ฉฐ

์ž, ์—ฌ๊ธฐ๊นŒ์ง€ ๋ผ๋ผ๋ฒจ๊ณผ web3.js๋ฅผ ์‚ฌ์šฉํ•ด์„œ ๋ธ”๋ก์ฒด์ธ CMS๋ฅผ ํ†ตํ•ฉํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์•Œ์•„๋ดค์–ด! ์ •๋ง ๊ธด ์—ฌ์ •์ด์—ˆ์ง€? ๐Ÿ˜…

์šฐ๋ฆฌ๊ฐ€ ๋‹ค๋ฃฌ ๋‚ด์šฉ์„ ์ •๋ฆฌํ•ด๋ณด๋ฉด:

โœ… ๋ผ๋ผ๋ฒจ๊ณผ web3.js์˜ ๊ธฐ๋ณธ ๊ฐœ๋…๊ณผ ์žฅ์ 
โœ… ์‹œ์Šคํ…œ ์•„ํ‚คํ…์ฒ˜ ์„ค๊ณ„ ๋ฐฉ๋ฒ•
โœ… ์Šค๋งˆํŠธ ์ปจํŠธ๋ž™ํŠธ ์ž‘์„ฑ๊ณผ ๋ฐฐํฌ
โœ… ํ”„๋ก ํŠธ์—”๋“œ์™€ ๋ฐฑ์—”๋“œ ํ†ตํ•ฉ
โœ… ๋ฉ”ํƒ€๋งˆ์Šคํฌ ์ธ์ฆ ์‹œ์Šคํ…œ
โœ… IPFS๋ฅผ ํ™œ์šฉํ•œ ํŒŒ์ผ ์ €์žฅ
โœ… ์„ฑ๋Šฅ ์ตœ์ ํ™”์™€ ๋ณด์•ˆ ์ „๋žต
โœ… ํ…Œ์ŠคํŠธ์™€ ๋ฐฐํฌ ๋ฐฉ๋ฒ•
โœ… ์‹ค์ „ ํ™œ์šฉ ์‚ฌ๋ก€์™€ ๋ฏธ๋ž˜ ์ „๋ง

๋ธ”๋ก์ฒด์ธ ๊ธฐ์ˆ ์€ ์•„์ง ๋ฐœ์ „ ์ค‘์ด๊ณ , ์ƒˆ๋กœ์šด ๋„๊ตฌ์™€ ํŒจํ„ด๋“ค์ด ๊ณ„์† ๋‚˜์˜ค๊ณ  ์žˆ์–ด. ํ•˜์ง€๋งŒ ๊ธฐ๋ณธ ์›๋ฆฌ๋ฅผ ์ดํ•ดํ•˜๊ณ  ์žˆ๋‹ค๋ฉด ์–ด๋–ค ๋ณ€ํ™”์—๋„ ๋น ๋ฅด๊ฒŒ ์ ์‘ํ•  ์ˆ˜ ์žˆ์„ ๊ฑฐ์•ผ! ๐Ÿ’ช

๊ฐ€์žฅ ์ค‘์š”ํ•œ ๊ฑด ์ง์ ‘ ๋งŒ๋“ค์–ด๋ณด๋Š” ๊ฒƒ์ด์•ผ. ์ด ๊ธ€์„ ์ฝ๋Š” ๊ฒƒ๋งŒ์œผ๋กœ๋Š” ๋ถ€์กฑํ•ด. ํ…Œ์ŠคํŠธ๋„ท์—์„œ ์‹ค์ œ๋กœ ์ปจํŠธ๋ž™ํŠธ๋ฅผ ๋ฐฐํฌํ•ด๋ณด๊ณ , ๋ผ๋ผ๋ฒจ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ๋งŒ๋“ค์–ด๋ณด๊ณ , ์—๋Ÿฌ๋ฅผ ๋งŒ๋‚˜๊ณ  ํ•ด๊ฒฐํ•˜๋ฉด์„œ ์ง„์งœ ์‹ค๋ ฅ์ด ๋Š˜์–ด๋‚˜๋Š” ๊ฑฐ์•ผ! ๐ŸŽฏ

์žฌ๋Šฅ๋„ท(https://www.jaenung.net) ๊ฐ™์€ ํ”Œ๋žซํผ์—์„œ ์—ฌ๋Ÿฌ๋ถ„์˜ ๋ธ”๋ก์ฒด์ธ ๊ฐœ๋ฐœ ์žฌ๋Šฅ์„ ๊ณต์œ ํ•  ์ˆ˜๋„ ์žˆ๊ณ , ๋‹ค๋ฅธ ์ „๋ฌธ๊ฐ€๋“ค์˜ ์ง€์‹์„ ๋ฐฐ์šธ ์ˆ˜๋„ ์žˆ์–ด. ํ˜ผ์ž ๊ณต๋ถ€ํ•˜๊ธฐ ์–ด๋ ต๋‹ค๋ฉด ์ปค๋ฎค๋‹ˆํ‹ฐ์˜ ๋„์›€์„ ๋ฐ›๋Š” ๊ฒƒ๋„ ์ข‹์€ ๋ฐฉ๋ฒ•์ด์ง€! ๐Ÿค

๋ธ”๋ก์ฒด์ธ๊ณผ ์›น ๊ฐœ๋ฐœ์˜ ๊ฒฐํ•ฉ์€ ์ •๋ง ํฅ๋ฏธ์ง„์ง„ํ•œ ๋ถ„์•ผ์•ผ. ํƒˆ์ค‘์•™ํ™”๋œ ๋ฏธ๋ž˜๋ฅผ ํ•จ๊ป˜ ๋งŒ๋“ค์–ด๊ฐ€๋Š” ๊ฐœ๋ฐœ์ž๊ฐ€ ๋˜๊ธธ ๋ฐ”๋ผ! ํ™”์ดํŒ…! ๐Ÿš€โœจ

Happy Coding! Build the Decentralized Future

๐ŸŽ‰ ์ถ•ํ•˜ํ•ฉ๋‹ˆ๋‹ค! ๋ธ”๋ก์ฒด์ธ CMS ํ†ตํ•ฉ ๋งˆ์Šคํ„ฐ ๊ณผ์ •์„ ์™„๋ฃŒํ–ˆ์Šต๋‹ˆ๋‹ค! ๐ŸŽ‰

๋Œ“๊ธ€ ์ž‘์„ฑ

์ด ๊ธ€์— ๋Œ€ํ•œ ์—ฌ๋Ÿฌ๋ถ„์˜ ์ƒ๊ฐ์„ ๋“ค๋ ค์ฃผ์„ธ์š”

๋Œ“๊ธ€ 0
๋Œ“๊ธ€์„ ๋ถˆ๋Ÿฌ์˜ค๋Š” ์ค‘์ž…๋‹ˆ๋‹ค.

์•„์ง ๋Œ“๊ธ€์ด ์—†์Šต๋‹ˆ๋‹ค.