Skip to content

Commit 85dfe7c

Browse files
SaeeDawodsaeeddawodbl0up
authored
Hardhat hybrid (#48)
Co-authored-by: saeeddawod <saeed.dawod@gmail.com> Co-authored-by: bl0up <ambroise.m2@gmail.com>
1 parent 62cf526 commit 85dfe7c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+11679
-40066
lines changed

.env.example

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/workflows/branch.yml

Lines changed: 0 additions & 127 deletions
This file was deleted.

.github/workflows/solidity.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Branch
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
tags:
11+
- 'v*'
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
permissions:
18+
actions: write
19+
checks: write
20+
contents: write
21+
deployments: write
22+
id-token: write
23+
issues: write
24+
discussions: write
25+
packages: write
26+
pages: write
27+
pull-requests: write
28+
repository-projects: write
29+
security-events: write
30+
statuses: write
31+
32+
jobs:
33+
ci:
34+
name: CI
35+
uses: settlemint/smart-contracts-actions/.github/workflows/solidity.yml@main
36+
secrets:
37+
TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
with:
39+
docker-image-name: solidity-supplychain
40+
runs-on: solidity-supplychain
41+
ignition-module: 'ignition/modules/ExampleSupplyChainModule.ts'
42+
subgraph-contract-address-key: 'ExampleSupplyChainModule#ExampleSupplyChain'

.gitignore

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
1+
node_modules
2+
.env
3+
4+
# Hardhat files
5+
/cache
6+
/artifacts
7+
8+
# TypeChain files
9+
/typechain
10+
/typechain-types
11+
12+
# solidity-coverage files
13+
/coverage
14+
/coverage.json
15+
lcov.info
16+
17+
# Hardhat Ignition default folder for deployments against a local node
18+
ignition/deployments/chain-31337
19+
120
# Compiler files
2-
cache/
21+
cache_forge/
322
out/
423

524
# Ignores development broadcast logs
@@ -14,12 +33,7 @@ docs/
1433
.env
1534

1635
# Subgraphs
17-
deployment.txt
18-
deployment-anvil.txt
19-
subgraph/subgraph.config.json
20-
subgraph/node_modules
21-
subgraph/generated
22-
subgraph/build
23-
node_modules/
24-
25-
.pnpm
36+
generated
37+
build
38+
39+
.pnpm

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
url = https://github.com/foundry-rs/forge-std
44
[submodule "lib/openzeppelin-contracts"]
55
path = lib/openzeppelin-contracts
6-
url = https://github.com/openzeppelin/openzeppelin-contracts
6+
url = https://github.com/OpenZeppelin/openzeppelin-contracts

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.yaml

.solhint.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "solhint:recommended"
3+
}

Dockerfile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@ FROM node:20.14.0-bookworm as build
22

33
ENV FOUNDRY_DIR /usr/local
44
RUN curl -L https://foundry.paradigm.xyz | bash && \
5-
/usr/local/bin/foundryup --version nightly-f625d0fa7c51e65b4bf1e8f7931cd1c6e2e285e9
5+
/usr/local/bin/foundryup
66

77
WORKDIR /
88

9-
RUN git config --global user.email "hello@settlemint.com" && \
10-
git config --global user.name "SettleMint" && \
11-
forge init usecase --template settlemint/solidity-supplychain && \
12-
cd usecase && \
13-
forge build
9+
COPY . /usecase
1410

15-
RUN cd usecase/subgraph && \
16-
npm install
11+
WORKDIR /usecase
1712

1813
USER root
1914

15+
RUN npm install
16+
RUN forge build
17+
RUN npx hardhat compile
18+
2019
FROM cgr.dev/chainguard/busybox:latest
2120

2221
COPY --from=build /usecase /usecase
2322
COPY --from=build /root/.svm /usecase-svm
23+
COPY --from=build /root/.cache /usecase-cache

Makefile

Lines changed: 0 additions & 99 deletions
This file was deleted.

0 commit comments

Comments
 (0)