NiftyApes / hsla-dappV1

app.niftyapes.money
https://dapp-v1-niftyapes.vercel.app
MIT License
1 stars 0 forks source link

Nifty Apes DApp

Stacks

Engines

Node

Yarn

corepack prepare yarn@1.22.17 --activate

How to install deps

yarn install
yarn run prepare

Environment variables

Make sure that you copy .env.example to .env.development for local development. For production, make sure that you make .env.production. The typical env vars should be asked to Zach.

How to run smart contracts locally with Hardhat

yarn hardhat-yarn-install
yarn fork
yarn setup-local-chain # clean, compile, build, deploy
yarn fund-10 --to <address> # give 10 eth to address
yarn mint --to <address> # mint 6 Scaffold NFTs to address
yarn transfer-real-nfts --to <address> # transfer mainnet NFTs (BAYC, MAYC, Doodles) to address
yarn setup-offer # deposit eth liquidity & create offer

How to run the app

Make sure you've at least run yarn chain and yarn setup-local-chain above so that the frontend has access to required generated files.

yarn start

Notes

Make sure you've added a local network to Metamask.

If the local chain isn't processing transactions and giving you a "Known transaction" message, try resetting Metamask: Settings > Advanced > Reset Account.

If the local chain is giving you an error like "Received invalid block tag 14724346. Latest block number is 14724009" (with different block numbers), try resetting Metamask: Settings > Advanced > Reset Account.

Add the following lines to ~/.huskyrc:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"