-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
377169c
commit 299f6b7
Showing
9 changed files
with
2,672 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
.idea | ||
cache | ||
# Logs | ||
logs | ||
*.log | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# syntax=docker/dockerfile:1 | ||
|
||
# Comments are provided throughout this file to help you get started. | ||
# If you need more help, visit the Dockerfile reference guide at | ||
# https://docs.docker.com/go/dockerfile-reference/ | ||
|
||
# Want to help us make this template better? Share your feedback here: https://forms.gle/ybq9Krt8jtBL3iCk7 | ||
|
||
ARG NODE_VERSION=lts | ||
ARG PNPM_VERSION=9.1.0 | ||
|
||
FROM node:${NODE_VERSION}-alpine | ||
|
||
# Use production node environment by default. | ||
ENV NODE_ENV production | ||
|
||
# Install pnpm. | ||
RUN --mount=type=cache,target=/root/.npm \ | ||
npm install -g pnpm@${PNPM_VERSION} | ||
|
||
WORKDIR /usr/src/app | ||
|
||
# Download dependencies as a separate step to take advantage of Docker's caching. | ||
# Leverage a cache mount to /root/.local/share/pnpm/store to speed up subsequent builds. | ||
# Leverage a bind mounts to package.json and pnpm-lock.yaml to avoid having to copy them into | ||
# into this layer. | ||
RUN --mount=type=bind,source=package.json,target=package.json \ | ||
--mount=type=bind,source=pnpm-lock.yaml,target=pnpm-lock.yaml \ | ||
--mount=type=cache,target=/root/.local/share/pnpm/store \ | ||
pnpm install --prod --frozen-lockfile | ||
|
||
# Copy the rest of the source files into the image. | ||
COPY . . | ||
|
||
# Expose the port that the application listens on. | ||
EXPOSE 8545 | ||
|
||
# Run the application. | ||
CMD pnpm start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import "dotenv/config"; | ||
import { HardhatUserConfig } from "hardhat/config"; | ||
import "@nomicfoundation/hardhat-ethers"; | ||
|
||
import networks from "./src/networks"; | ||
|
||
|
||
const config: HardhatUserConfig = { | ||
solidity: "0.8.23", | ||
networks: { | ||
hardhat: { | ||
initialBaseFeePerGas: 0, | ||
accounts: { | ||
count: 10, | ||
}, | ||
chainId: 1, | ||
forking: { | ||
url: networks.rpcUrl("eth", "mainnet"), | ||
}, | ||
}, | ||
}, | ||
mocha: { | ||
timeout: 5 * 60 * 1000, | ||
}, | ||
keystores: { | ||
path: "keystores", | ||
}, | ||
}; | ||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "hardhat-project", | ||
"scripts": { | ||
"start": "hardhat node" | ||
}, | ||
"devDependencies": { | ||
"prettier": "^3.0.0", | ||
"ts-node": "^10.9.2", | ||
"typescript": "^5.4.5" | ||
}, | ||
"dependencies": { | ||
"@nomicfoundation/hardhat-ethers": "^3.0.4", | ||
"dotenv": "^16.3.1", | ||
"ethers": "^6.7.1", | ||
"hardhat": "^2.16.1" | ||
} | ||
} |
Oops, something went wrong.