查看最终代码和网站效果
https://github.com/skka3134/Dapp-Ticketmaster-Clone
https://dapp-ticketmaster-clone-foelzygo-skka3134.4everland.app/
- 使用 remix and Wizard 开发合约
https://remix.ethereum.org/
https://docs.openzeppelin.com/contracts/4.x/wizard
编译选择 optimization 优化,版本选择 0.18.8+
部署到 sepolia 0x734e5aE3a4DDD8f8dF0f8703617a3D593D353d4C
- 创建一个 React 项目
npx create-react-app test
- 安装依赖
npm install [email protected]
npm install [email protected]
npm install web3uikit
npm install @web3uikit/icons
npm install @web3uikit/core
npm install [email protected]
npm install express
npm install dotenv
npm install cors
npm install moralis
npm install react-moralis
npm install bootstrap
npm install react-bootstrap
- 启动项目
npm start
- 修改 index.css
- 创建导航组件 /src/components/Navigation.js
- 创建卡片组件 src/components/Card.js
- 创建搜索组件 /src/components/Sort.js
- 创建坐位组件 /src/components/Seat.js
- 创建坐位组件 /src/components/SeatChart.js
- 导入合约的 abi /src/abis/TokenMaster.json
- 修改网页 /src/app.js
- 上传到 github
https://github.com/
https://github.com/skka3134/Dapp-Ticketmaster-Clone - 部署到 4everland,4everland 是一个静态托管工具,一步到位。
https://4everland.org/
https://dapp-ticketmaster-clone-foelzygo-skka3134.4everland.app/