-
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.
chore: init from https://github.com/settlemint/solidity-empty at e94314e
- Loading branch information
0 parents
commit 4353add
Showing
19 changed files
with
668 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,20 @@ | ||
changelog: | ||
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,28 @@ | ||
{ | ||
"$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", | ||
":disableDependencyDashboard" | ||
], | ||
"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,110 @@ | ||
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: | ||
load: false | ||
push: true | ||
platforms: linux/amd64,linux/arm64 | ||
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,102 @@ | ||
{ | ||
"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-btp", | ||
"type": "shell", | ||
"command": "EXTRA_ARGS=\"${input:extra-deployment-verify} ${input:extra-deployment-other}\" make deploy-btp", | ||
"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": "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:20.11.1-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 |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 SettleMint | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Oops, something went wrong.