This cron process refreshes an ERC-721 collection's metadata on Opensea on a given schedule. This utility makes it easy to keep OpenSea's offchain cache up-to-date for a given collection.
Thanks to BuidlGuidl for supporting this release.
Clone this repository:
git clone https://github.com/yourusername/Opensea-Metadata-Refresh-Cron.git
cd Opensea-Metadata-Refresh-Cron
This project uses pnpm
as a package manager. If you don't have pnpm
installed, install it globally using npm
:
npm install -g pnpm
Then the project dependencies:
pnpm install
Copy the .example.env
file to a new file named .env
. Fill out all fields in the .env
file:
cp .example.env .env
Start the development server using pnpm
:
pnpm dev
Build the application for production:
pnpm build
This command will compile the TypeScript files and output them to the dist
directory.
This application is designed to be run continuously on a production server using a process manager such as pm2
.
You can start the application without installing pm2 globally as it is already in the project dependencies:
pnpm start
This will start the application and keep it running, even if the server restarts.
You can view the application logs using the provided scripts:
pnpm logs
To stop the application:
pnpm stop
To restart the application:
pnpm restart
To remove the application from pm2
:
pnpm delete
To kill the pm2
daemon:
pnpm kill