Croptop opens up a project's NFT collection for contributions from anyone, so long as new posts meet criteria specified by the project owner.
For npm projects (recommended):
npm install @bananapus/721-hookFor forge projects (not recommended):
forge install Bananapus/nana-721-hookAdd @bananapus/721-hook/=lib/nana-721-hook/ to remappings.txt. You'll also need to install nana-721-hook's dependencies and add similar remappings for them.
nana-721-hook uses npm for package management and the Foundry development toolchain for builds, tests, and deployments. To get set up, install Node.js and install Foundry:
curl -L https://foundry.paradigm.xyz | shYou can download and install dependencies with:
npm install && forge installIf you run into trouble with forge install, try using git submodule update --init --recursive to ensure that nested submodules have been properly initialized.
Some useful commands:
| Command | Description |
|---|---|
forge build |
Compile the contracts and write artifacts to out. |
forge fmt |
Lint. |
forge test |
Run the tests. |
forge build --sizes |
Get contract sizes. |
forge coverage |
Generate a test coverage report. |
foundryup |
Update foundry. Run this periodically. |
forge clean |
Remove the build artifacts and cache directories. |
To learn more, visit the Foundry Book docs.
For convenience, several utility commands are available in package.json.
| Command | Description |
|---|---|
npm test |
Run local tests. |
npm run coverage:lcov |
Generate an LCOV test coverage report. |
npm run deploy:ethereum-mainnet |
Deploy to Ethereum mainnet |
npm run deploy:ethereum-sepolia |
Deploy to Ethereum Sepolia testnet |
npm run deploy:optimism-mainnet |
Deploy to Optimism mainnet |
npm run deploy:optimism-testnet |
Deploy to Optimism testnet |