Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan-Feofanov committed May 29, 2024
1 parent 377169c commit 299f6b7
Show file tree
Hide file tree
Showing 9 changed files with 2,672 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.idea
cache
# Logs
logs
*.log
Expand Down
39 changes: 39 additions & 0 deletions Dockerfile
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
29 changes: 29 additions & 0 deletions hardhat.config.ts
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;
17 changes: 17 additions & 0 deletions package.json
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"
}
}
Loading

0 comments on commit 299f6b7

Please sign in to comment.