This Nextjs application is designed for Yamawake.
- Create .env
cp .env.sample .env
- Set configs
Set up configs under packages/lib/constants as you need
- Install dependencies
pnpm i --frozen-lockfilepnpm buildpnpm devnpx env-cmd -f .env.development.goerli pnpm devcd apps/web
npx env-cmd -f ../../.env.test pnpm testWith headless
cd apps/web
npx env-cmd -f ../../.env.test pnpm test:headlessWith build
cd apps/web
npx env-cmd -f ../../.env.test pnpm test:buildExample of .env.test for local chain.
NEXT_PUBLIC_ENV="local"
NEXT_PUBLIC_DEFAULT_CHAIN_ID='31337'
NETWORK_NAME="hardhat"
TEST_PROVIDER_ENDPOINT="http://localhost:8545"
TEST_FACTORY_ADDRESS="0x..."
- Comment out BASIC_AUTH_USER and BASIC_AUTH_PASS in your .env while e2e test
-
Add template name to packages/lib/constants/templates.ts
-
Create a directory under packages/ui/components/auctions and packages/ui/hooks
-
Add components and hooks as needed
-
Add switch conditions to the following files
- packages/ui/components/auctions/AuctionCard.tsx
- packages/ui/components/auctions/AuctionDetail.tsx
- packages/ui/components/auctions/AuctionFormWrapper.tsx
- Deploy subgraph to the target network
- Set up network configs in
packages/lib/constants/contractsas you needpackages/lib/constants/chains.tspackages/lib/constants/contracts.tspackages/lib/constants/subgraphEndpoints.tspackages/lib/constants/templates.tspackages/lib/constants/priceFeeds.ts
- Update environment variables
- Add chain id to NEXT_PUBLIC_SUPPOTED_CHAIN_IDS
- Add NEXT_PUBLIC_SUBGRAPH_ENDPOINT_{NETWORK NAME}
cd subgraph
yarn codegen && yarn build:mainnet
yarn deploy --studio SUBGRAPH_NAMEcd subgraph
yarn testSimulate github workflow locally with nektos/act https://github.com/nektos/act
act pull_request --secret-file .env.test.actions.secrets --env-file .env.test.actions --artifact-server-path /PATH/TO/ARTIFACTS/ --artifact-server-addr $(ipconfig getifaddr en0)