- Web application framework - Next.js
- Solidity development environment - Hardhat
- File Storage - IPFS
- Blockchain infrastructure - Infura
- Ethereum Web Client Library - Ethers.js
- Install the dependencies
npm install
# or
yarn
- Start the local Hardhat node
npx hardhat node
- Deploy the contracts to the local network
npx hardhat run scripts/deploy.js --network localhost
This command create config.js for contract accessing from frontend.
- Create ipfs_project in Infura.
[INFURA](https://infura.io/)
- Set environment variable to Next.js
# matamask private key
NEXT_PUBLIC_PRIVATE_KEY=
# infura_ipfs settings
NEXT_PUBLIC_PROJECT_ID=
NEXT_PUBLIC_PROJECT_SECRET=
NEXT_PUBLIC_INFURA_IPFS_DEDICATED_GATEWAYS_SUBDOMAIN=
- Modify next.config.js Enable to access external image url.
images: {
domains: [
// https://docs.infura.io/infura/networks/ipfs/how-to/access-ipfs-content/dedicated-gateways
'${YOUR_INFURA_IPFS_DEDICATED_GATEWAYS_SUBDOMAIN}.infura-ipfs.io'
],
},
- Start Next.js
npm run dev
# or
yarn dev
npx hardhat test
This command executes script of /test