Skip to content

Commit

Permalink
feat: hybrid hardhat foundry (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
bl0up authored Jun 5, 2024
1 parent 1f79d13 commit d446896
Show file tree
Hide file tree
Showing 24 changed files with 11,902 additions and 5,909 deletions.
5 changes: 0 additions & 5 deletions .env.example

This file was deleted.

127 changes: 0 additions & 127 deletions .github/workflows/branch.yml

This file was deleted.

42 changes: 42 additions & 0 deletions .github/workflows/solidity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Branch

on:
pull_request:
branches:
- main
push:
branches:
- main
tags:
- 'v*'

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:
ci:
name: CI
uses: settlemint/smart-contracts-actions/.github/workflows/solidity.yml@main
secrets:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
docker-image-name: solidity-token-soulbound
runs-on: solidity-token-soulbound
ignition-module: 'ignition/modules/SoulboundToken.ts'
subgraph-contract-address-key: 'SoulboundTokenModule#Soulbound'
29 changes: 22 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
node_modules
.env

# Hardhat files
/cache
/artifacts

# TypeChain files
/typechain
/typechain-types

# solidity-coverage files
/coverage
/coverage.json
lcov.info

# Hardhat Ignition default folder for deployments against a local node
ignition/deployments/chain-31337

# Compiler files
cache/
cache_forge/
out/

# Ignores development broadcast logs
Expand All @@ -14,11 +33,7 @@ docs/
.env

# Subgraphs
deployment.txt
deployment-anvil.txt
subgraph/subgraph.config.json
subgraph/node_modules
subgraph/generated
subgraph/build
generated
build

.pnpm
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.yaml
3 changes: 3 additions & 0 deletions .solhint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "solhint:recommended"
}
9 changes: 4 additions & 5 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"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"
"cnshenj.vscode-task-manager",
"catppuccin.catppuccin-vsc-icons",
"catppuccin.catppuccin-vsc"
]
}
}
88 changes: 37 additions & 51 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,98 +2,84 @@
"version": "2.0.0",
"tasks": [
{
"label": "build",
"label": "Foundry - Build",
"type": "shell",
"command": "make build",
"command": "btp-scs foundry build",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": []
},
{
"label": "test",
"label": "Hardhat - Build",
"type": "shell",
"command": "make test",
"group": "test",
"command": "btp-scs hardhat build",
"group": {
"kind": "build",
"isDefault": false
},
"problemMatcher": []
},
{
"label": "format",
"label": "Foundry - Test",
"type": "shell",
"command": "make format",
"command": "btp-scs foundry test",
"group": "test",
"problemMatcher": []
},
{
"label": "snapshot",
"label": "Hardhat - Test",
"type": "shell",
"command": "make snapshot",
"command": "btp-scs hardhat test",
"group": "test",
"problemMatcher": []
},
{
"label": "anvil",
"label": "Foundry - Format",
"type": "shell",
"command": "make anvil",
"command": "btp-scs foundry format",
"problemMatcher": []
},
{
"label": "deploy-anvil",
"label": "Foundry - Start network",
"type": "shell",
"command": "make deploy-anvil",
"problemMatcher": []
"command": "btp-scs foundry network",
"problemMatcher": [],
"isBackground": true
},
{
"label": "Hardhat - Start network",
"type": "shell",
"command": "btp-scs hardhat network",
"problemMatcher": [],
"isBackground": true,
},
{
"label": "deploy-btp",
"label": "Hardhat - Deploy to local network",
"type": "shell",
"command": "EXTRA_ARGS=\"${input:extra-deployment-verify} ${input:extra-deployment-other}\" make deploy-btp",
"command": "btp-scs hardhat deploy local -m ${input:deployment-module}",
"problemMatcher": []
},
{
"label": "subgraph",
"label": "Hardhat - Deploy to platform network",
"type": "shell",
"command": "make subgraph",
"command": "btp-scs hardhat deploy remote -m ${input:deployment-module}",
"problemMatcher": []
},
{
"label": "help",
"label": "The Graph - Deploy or update the subgraph",
"type": "shell",
"command": "make help",
"command": "btp-scs subgraph deploy",
"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"
"id": "deployment-module",
"description": "Hardhat Ignition Module",
"type": "promptString",
"default": "ignition/modules/SoulboundToken.ts"
}
]
}
Loading

0 comments on commit d446896

Please sign in to comment.