Skip to content

Commit

Permalink
refactor: turn PRBMath into free functions
Browse files Browse the repository at this point in the history
build: add forge-std and prb-test dev depdendencies
build: upgrade dev deps
build: upgrade to Solidity v0.8.17
build: upgrade to Yarn v3.2.4
chore: delete ".czrc" file
chore: delete superfluous ".npmignore" file
chore: delete stale "out" directory
chore: update package.json for Foundry environment
chore: update config and ignore files for Foundry environment
chore: use "yml" extension for lint-staged confi
docs: define version hyperlinks at the top
refactor: delete Hardhat and its Node.js paraphernalia
refactor: switch to Foundry
style: enable "proseWrap" rule in Prettier config
test: add Solidity tests (WIP)
test: delete stale test contracts
test: delete Node.js tests
  • Loading branch information
PaulRBerg committed Nov 5, 2022
1 parent e3213d7 commit 1b82ea7
Show file tree
Hide file tree
Showing 144 changed files with 4,571 additions and 513,139 deletions.
3 changes: 0 additions & 3 deletions .czrc

This file was deleted.

3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ trim_trailing_whitespace = true

[*.sol]
indent_size = 4

[*.tree]
indent_size = 1
5 changes: 3 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
INFURA_API_KEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
MNEMONIC="here is where your twelve words mnemonic should be put my friend"
export ETH_FROM="YOUR_DEFAULT_SENDER_ACCOUNT"
export ETH_RPC_URL="https://sepolia.infura.io/v3/INFURA_API_KEY"
export PRIVATE_KEY="YOUR_PRIVATE_KEY"
21 changes: 0 additions & 21 deletions .eslintignore

This file was deleted.

23 changes: 0 additions & 23 deletions .eslintrc.yml

This file was deleted.

19 changes: 8 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,19 @@
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
**/.nyc_output
**/artifacts
**/build
**/cache
**/coverage
**/coverage-contracts
**/coverage-ts
**/dist
**/node_modules
**/src/types
**/out

# files
*.env
*.log
*.tsbuildinfo
coverage.json
npm-debug.log*
.DS_Store
.pnp.*
yarn-debug.log*
yarn-error.log*

# broadcasts
!/broadcast
/broadcast/*
/broadcast/*/31337/
8 changes: 8 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[submodule "lib/forge-std"]
branch = "v0.3"
path = "lib/forge-std"
url = "https://github.com/foundry-rs/forge-std"
[submodule "lib/prb-test"]
branch = "0.1.3"
path = "lib/prb-test"
url = "https://github.com/paulrberg/prb-test"
5 changes: 0 additions & 5 deletions .lintstagedrc

This file was deleted.

2 changes: 2 additions & 0 deletions .lintstagedrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"*.{json,md,sol,yml}":
- prettier --config ./.prettierrc.yml --write
8 changes: 0 additions & 8 deletions .mocharc.yml

This file was deleted.

12 changes: 0 additions & 12 deletions .nycrc.yml

This file was deleted.

17 changes: 8 additions & 9 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# directories
.yarn/
**/.nyc_output
**/artifacts
**/build
**/broadcast
**/cache
**/coverage
**/coverage-contracts
**/coverage-ts
**/dist
**/lib
**/out
**/node_modules
**/src/types

# files
*.env
*.log
.pnp.*
coverage.json
LICENSE.md
yarn-debug.log*
yarn-error.log*
17 changes: 5 additions & 12 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
arrowParens: avoid
bracketSpacing: true
endOfLine: auto

endOfLine: "auto"
printWidth: 120
proseWrap: "always"
singleQuote: false
tabWidth: 2
trailingComma: all
trailingComma: "all"

overrides:
- files: "*.sol"
- files: ["*.sol"]
options:
compiler: "0.8.15"
compiler: "0.8.17"
tabWidth: 4
- files: "*.ts"
options:
importOrder: ["<THIRD_PARTY_MODULES>", "^[./]"]
importOrderParserPlugins: ["typescript"]
importOrderSeparation: true
importOrderSortSpecifiers: true
10 changes: 0 additions & 10 deletions .solcover.js

This file was deleted.

4 changes: 3 additions & 1 deletion .solhint.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"code-complexity": "off",
"compiler-version": ["error", ">=0.8.13"],
"const-name-snakecase": "off",
"func-visibility": ["error", { "ignoreConstructors": true }],
"contract-name-camelcase": "off",
"func-name-mixedcase": "off",
"func-visibility": "off",
"max-line-length": ["error", 132],
"no-inline-assembly": "off",
"not-rely-on-time": "off",
Expand Down
211 changes: 103 additions & 108 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Large diffs are not rendered by default.

785 changes: 0 additions & 785 deletions .yarn/releases/yarn-3.2.0.cjs

This file was deleted.

801 changes: 801 additions & 0 deletions .yarn/releases/yarn-3.2.4.cjs

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
enableTelemetry: false

nodeLinker: node-modules
nodeLinker: "node-modules"

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
- path: ".yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs"
spec: "@yarnpkg/plugin-interactive-tools"

yarnPath: .yarn/releases/yarn-3.2.0.cjs
yarnPath: .yarn/releases/yarn-3.2.4.cjs
36 changes: 18 additions & 18 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

[2.5.0]: https://github.com/paulrberg/prb-math/compare/v2.4.3...v2.5.0
[2.4.3]: https://github.com/paulrberg/prb-math/compare/v2.4.2...v2.4.3
[2.4.2]: https://github.com/paulrberg/prb-math/compare/v2.4.1...v2.4.2
[2.4.1]: https://github.com/paulrberg/prb-math/compare/v2.4.0...v2.4.1
[2.4.0]: https://github.com/paulrberg/prb-math/compare/v2.3.0...v2.4.0
[2.3.0]: https://github.com/paulrberg/prb-math/compare/v2.2.0...v2.3.0
[2.2.0]: https://github.com/paulrberg/prb-math/compare/v2.1.0...v2.2.0
[2.1.0]: https://github.com/paulrberg/prb-math/compare/v2.0.1...v2.1.0
[2.0.1]: https://github.com/paulrberg/prb-math/compare/v2.0.0...v2.0.1
[2.0.0]: https://github.com/paulrberg/prb-math/compare/v1.1.0...v2.0.0
[1.1.0]: https://github.com/paulrberg/prb-math/compare/v1.0.5...v1.1.0
[1.0.5]: https://github.com/paulrberg/prb-math/compare/v1.0.4...v1.0.5
[1.0.4]: https://github.com/paulrberg/prb-math/compare/v1.0.3...v1.0.4
[1.0.3]: https://github.com/paulrberg/prb-math/compare/v1.0.2...v1.0.3
[1.0.2]: https://github.com/paulrberg/prb-math/compare/v1.0.1...v1.0.2
[1.0.1]: https://github.com/paulrberg/prb-math/compare/v1.0.0...v1.0.1
[1.0.0]: https://github.com/paulrberg/prb-math/releases/tag/v1.0.0

## [2.5.0] - 2022-03-08

### Changed
Expand Down Expand Up @@ -201,21 +219,3 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### Added

- First release of the library.

[2.5.0]: https://github.com/paulrberg/prb-math/compare/v2.4.3...v2.5.0
[2.4.3]: https://github.com/paulrberg/prb-math/compare/v2.4.2...v2.4.3
[2.4.2]: https://github.com/paulrberg/prb-math/compare/v2.4.1...v2.4.2
[2.4.1]: https://github.com/paulrberg/prb-math/compare/v2.4.0...v2.4.1
[2.4.0]: https://github.com/paulrberg/prb-math/compare/v2.3.0...v2.4.0
[2.3.0]: https://github.com/paulrberg/prb-math/compare/v2.2.0...v2.3.0
[2.2.0]: https://github.com/paulrberg/prb-math/compare/v2.1.0...v2.2.0
[2.1.0]: https://github.com/paulrberg/prb-math/compare/v2.0.1...v2.1.0
[2.0.1]: https://github.com/paulrberg/prb-math/compare/v2.0.0...v2.0.1
[2.0.0]: https://github.com/paulrberg/prb-math/compare/v1.1.0...v2.0.0
[1.1.0]: https://github.com/paulrberg/prb-math/compare/v1.0.5...v1.1.0
[1.0.5]: https://github.com/paulrberg/prb-math/compare/v1.0.4...v1.0.5
[1.0.4]: https://github.com/paulrberg/prb-math/compare/v1.0.3...v1.0.4
[1.0.3]: https://github.com/paulrberg/prb-math/compare/v1.0.2...v1.0.3
[1.0.2]: https://github.com/paulrberg/prb-math/compare/v1.0.1...v1.0.2
[1.0.1]: https://github.com/paulrberg/prb-math/compare/v1.0.0...v1.0.1
[1.0.0]: https://github.com/paulrberg/prb-math/releases/tag/v1.0.0
6 changes: 0 additions & 6 deletions contracts/.npmignore

This file was deleted.

Loading

0 comments on commit 1b82ea7

Please sign in to comment.