A Next.js application for viewing verified smart contract details from the Sourcify API.
- Node.js 20.x or later
- npm or yarn
- Docker (optional, for containerized deployment)
Create a .env
file in the root directory with the following variables:
SOURCIFY_SERVER_URL=https://sourcify.dev/server
-
Clone the repository:
git clone https://github.com/sourcifyeth/repo.sourcify.dev.git cd repo.sourcify.dev
-
Install dependencies:
npm install # or yarn install
-
Run the development server:
npm run dev # or yarn dev
-
Open http://localhost:3000 in your browser to see the application.
npm run build
npm start
# or
yarn build
yarn start
The project includes a Dockerfile based on the official Next.js Docker example.
-
Build the Docker image:
docker build -t repo-sourcify .
-
Run the container:
docker run -p 3000:3000 -e SOURCIFY_SERVER_URL=https://sourcify.dev/server sourcify-contract-viewer
-
Access the application at http://localhost:3000.