Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format Solidity + JS + TS files, pnpm workspace #97

Merged
merged 16 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/contracts-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
with:
node-version-file: '.node-version'
cache: 'pnpm'
cache-dependency-path: 'contracts/pnpm-lock.yaml'
cache-dependency-path: 'pnpm-lock.yaml'

- name: Install dependencies
run: pnpm install
Expand Down Expand Up @@ -142,11 +142,12 @@ jobs:
with:
version: 8

- uses: actions/setup-node@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.node-version'
cache: 'pnpm'
cache-dependency-path: 'contracts/pnpm-lock.yaml'
cache-dependency-path: 'pnpm-lock.yaml'

- name: Install dependencies
run: pnpm install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/testnet-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
with:
node-version-file: '.node-version'
cache: 'pnpm'
cache-dependency-path: 'contracts/pnpm-lock.yaml'
cache-dependency-path: 'pnpm-lock.yaml'

- name: Install dependencies
run: pnpm install
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"dprint.dprint"
]
}
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"editor.defaultFormatter": "dprint.dprint",
"dprint.path": "node_modules/.bin/dprint"
}
1 change: 0 additions & 1 deletion contracts/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ docs/

artifacts
cache_hardhat
node_modules

coverage/
coverage.json
Expand Down
8 changes: 4 additions & 4 deletions contracts/.solcover.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module.exports = {
// Improve performance by skipping statements and functions. Tool still checks lines of code and branches:
// https://github.com/sc-forks/solidity-coverage/blob/master/docs/advanced.md
//measureStatementCoverage: false,
//measureFunctionCoverage: false,
// measureStatementCoverage: false,
// measureFunctionCoverage: false,

skipFiles: [
"GasPool",
Expand All @@ -14,12 +14,12 @@ module.exports = {
"Dependencies/Math.sol",
"Dependencies/Ownable.sol",
"Dependencies/",
"Integrations/"
"Integrations/",
],
// https://github.com/sc-forks/solidity-coverage/blob/master/docs/advanced.md#skipping-tests
mocha: {
grep: "@skip-on-coverage", // Find everything with this tag
invert: true // Run the grep's inverse set.
invert: true, // Run the grep's inverse set.
},
contractsDir: "src/",
};
8 changes: 4 additions & 4 deletions contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

Foundry consists of:

- **Forge**: Ethereum testing framework (like Truffle, Hardhat and DappTools).
- **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data.
- **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network.
- **Chisel**: Fast, utilitarian, and verbose solidity REPL.
- **Forge**: Ethereum testing framework (like Truffle, Hardhat and DappTools).
- **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data.
- **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network.
- **Chisel**: Fast, utilitarian, and verbose solidity REPL.

## Documentation

Expand Down
4,008 changes: 2,004 additions & 2,004 deletions contracts/hardhatAccountsList2k.js

Large diffs are not rendered by default.

12 changes: 4 additions & 8 deletions contracts/package.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
{
"name": "bold",
"name": "bold-contracts",
"version": "1.0.0",
"description": "Bold decentralized stablecoin",
"main": "index.js",
"directories": {
"lib": "lib"
},
"scripts": {
"format": "forge fmt && dprint fmt",
"test": "hardhat test --parallel",
"coverage": "hardhat coverage"
},
"repository": {
"type": "git",
"url": "git+https://github.com/liquity/bold.git"
},
"repository": "github:liquity/bold",
"author": "Liquity AG",
"license": "GPL-3.0",
"bugs": {
"url": "https://github.com/liquity/bold/issues"
},
"bugs": "https://github.com/liquity/bold/issues",
"homepage": "https://github.com/liquity/bold#readme",
"devDependencies": {
"@nomicfoundation/hardhat-chai-matchers": "^1.0.0",
Expand Down
Loading