-
Notifications
You must be signed in to change notification settings - Fork 1
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
0 parents
commit 5081255
Showing
19 changed files
with
687 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## Add your Etherscan (or altrnative network variant) to verify your smart contract on Etherscam | ||
ETHERSCAN_API_KEY= | ||
|
||
## Override the default --from address when deploying on BTP | ||
# ETH_FROM=0x0000000000000000000000000000000000000000 |
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,15 @@ | ||
version: v1 | ||
|
||
labels: | ||
- label: 'feat' | ||
matcher: | ||
title: '^feat:.*' | ||
- label: 'fix' | ||
matcher: | ||
title: '^fix:.*' | ||
- label: 'chore' | ||
matcher: | ||
title: '^chore:.*' | ||
- label: 'docs' | ||
matcher: | ||
title: '^docs:.*' |
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,23 @@ | ||
changelog: | ||
exclude: | ||
authors: | ||
- renovate | ||
categories: | ||
- title: Breaking Changes 🛠 | ||
labels: | ||
- breaking-change | ||
- title: Exciting New Features 🎉 | ||
labels: | ||
- feat | ||
- title: Important Bug Fixes 🐛 | ||
labels: | ||
- fix | ||
- title: Documentation 📚 | ||
labels: | ||
- docs | ||
- title: Other changes 🏗️ | ||
labels: | ||
- chore | ||
- title: Dependencies 📦 | ||
labels: | ||
- dependencies |
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,27 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": [ | ||
"config:recommended", | ||
":automergeMinor", | ||
":automergePr", | ||
":automergeRequireAllStatusChecks", | ||
":gitSignOff", | ||
":pinVersions", | ||
":semanticCommits", | ||
":semanticCommitTypeAll(chore)", | ||
":enableVulnerabilityAlerts", | ||
":combinePatchMinorReleases", | ||
":prConcurrentLimitNone", | ||
":prHourlyLimitNone", | ||
"security:openssf-scorecard", | ||
"schedule:nonOfficeHours" | ||
], | ||
"labels": ["dependencies"], | ||
"rebaseWhen": "conflicted", | ||
"packageRules": [], | ||
"hostRules": [ | ||
{ | ||
"timeout": 3000000 | ||
} | ||
] | ||
} |
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,109 @@ | ||
name: Branch | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- "v*" | ||
|
||
env: | ||
FOUNDRY_PROFILE: ci | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
actions: write | ||
checks: write | ||
contents: write | ||
deployments: write | ||
id-token: write | ||
issues: write | ||
discussions: write | ||
packages: write | ||
pages: write | ||
pull-requests: write | ||
repository-projects: write | ||
security-events: write | ||
statuses: write | ||
|
||
jobs: | ||
check: | ||
strategy: | ||
fail-fast: true | ||
|
||
name: Foundry project | ||
runs-on: namespace-profile-foundry | ||
steps: | ||
- name: Checkout | ||
uses: namespacelabs/nscloud-checkout-action@v2 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Setup caches | ||
uses: namespacelabs/nscloud-cache-action@v1 | ||
with: | ||
path: | | ||
cache | ||
out | ||
~/.foundry | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USER }} | ||
password: ${{ secrets.DOCKERHUB_PASS }} | ||
|
||
- name: Install Foundry | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
with: | ||
version: nightly | ||
|
||
- name: Run Forge build | ||
run: | | ||
forge --version | ||
forge build --sizes | ||
id: build | ||
|
||
- name: Run Forge tests | ||
run: | | ||
forge test -vvv | ||
id: test | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
# list of Docker images to use as base name for tags | ||
images: | | ||
ghcr.io/settlemint/solidity-empty | ||
# generate Docker tags based on the following events/attributes | ||
tags: | | ||
type=schedule | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=semver,pattern={{major}} | ||
type=sha | ||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
platforms: linux/amd64,linux/arm64 | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
no-cache: true |
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,28 @@ | ||
name: PR Labels | ||
|
||
on: | ||
pull_request: | ||
types: [opened, closed] | ||
branches: | ||
- main | ||
|
||
permissions: | ||
actions: write | ||
checks: write | ||
contents: write | ||
deployments: write | ||
id-token: write | ||
issues: write | ||
discussions: write | ||
packages: write | ||
pages: write | ||
pull-requests: write | ||
repository-projects: write | ||
security-events: write | ||
statuses: write | ||
|
||
jobs: | ||
labels: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: fuxingloh/multi-labeler@v4 |
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,24 @@ | ||
# Compiler files | ||
cache/ | ||
out/ | ||
|
||
# Ignores development broadcast logs | ||
!/broadcast | ||
/broadcast/*/31337/ | ||
/broadcast/**/dry-run/ | ||
|
||
# Docs | ||
docs/ | ||
|
||
# Dotenv file | ||
.env | ||
|
||
# Subgraphs | ||
deployment.txt | ||
deployment-anvil.txt | ||
subgraph/subgraph.config.json | ||
subgraph/node_modules | ||
subgraph/generated | ||
subgraph/build | ||
|
||
.pnpm |
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,3 @@ | ||
[submodule "lib/forge-std"] | ||
path = lib/forge-std | ||
url = https://github.com/foundry-rs/forge-std |
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,11 @@ | ||
{ | ||
"recommendations": [ | ||
"nomicfoundation.hardhat-solidity", | ||
"miguelsolorio.fluent-icons", | ||
"vscode-icons-team.vscode-icons", | ||
"genieai.chatgpt-vscode", | ||
"esbenp.prettier-vscode", | ||
"dracula-theme.theme-dracula", | ||
"cnshenj.vscode-task-manager" | ||
] | ||
} |
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,114 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "build", | ||
"type": "shell", | ||
"command": "make build", | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
}, | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "test", | ||
"type": "shell", | ||
"command": "make test", | ||
"group": "test", | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "format", | ||
"type": "shell", | ||
"command": "make format", | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "snapshot", | ||
"type": "shell", | ||
"command": "make snapshot", | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "anvil", | ||
"type": "shell", | ||
"command": "make anvil", | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "deploy-anvil", | ||
"type": "shell", | ||
"command": "make deploy-anvil", | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "deploy", | ||
"type": "shell", | ||
"command": "EXTRA_ARGS=\"${input:extra-deployment-verify} ${input:extra-deployment-other}\" make deploy", | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "script-anvil", | ||
"type": "shell", | ||
"command": "EXTRA_ARGS=\"${input:extra-script-broadcast} ${input:extra-script-other}\" make script-anvil", | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "script", | ||
"type": "shell", | ||
"command": "EXTRA_ARGS=\"${input:extra-script-broadcast} ${input:extra-script-other}\" make script", | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "cast", | ||
"type": "shell", | ||
"command": "make cast", | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "subgraph", | ||
"type": "shell", | ||
"command": "make subgraph", | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "help", | ||
"type": "shell", | ||
"command": "make help", | ||
"problemMatcher": [] | ||
} | ||
], | ||
"inputs": [ | ||
{ | ||
"id": "extra-deployment-verify", | ||
"description": "Extra deployment options?", | ||
"default": "", | ||
"type": "pickString", | ||
"options": [ | ||
"", | ||
"--verify --verifier sourcify", | ||
"--verify --verifier etherscan --etherscan-api-key ${ETHERSCAN_API_KEY}" | ||
] | ||
}, | ||
{ | ||
"id": "extra-deployment-other", | ||
"description": "Other extra deployment options?", | ||
"default": "", | ||
"type": "promptString" | ||
}, | ||
{ | ||
"id": "extra-script-broadcast", | ||
"description": "Broadcast?", | ||
"default": "", | ||
"type": "pickString", | ||
"options": ["", "--broadcast"] | ||
}, | ||
{ | ||
"id": "extra-script-other", | ||
"description": "Other extra script options?", | ||
"default": "", | ||
"type": "promptString" | ||
} | ||
] | ||
} |
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,20 @@ | ||
FROM node:21.6.2-bookworm as build | ||
|
||
ENV FOUNDRY_DIR /usr/local | ||
RUN curl -L https://foundry.paradigm.xyz | bash && \ | ||
/usr/local/bin/foundryup | ||
|
||
WORKDIR / | ||
|
||
RUN git config --global user.email "hello@settlemint.com" && \ | ||
git config --global user.name "SettleMint" && \ | ||
forge init usecase --template settlemint/solidity-empty && \ | ||
cd usecase && \ | ||
forge build | ||
|
||
USER root | ||
|
||
FROM busybox | ||
|
||
COPY --from=build /usecase /usecase | ||
COPY --from=build /root/.svm /usecase-svm |
Oops, something went wrong.