Skip to content

Commit

Permalink
refactor: switch to Foundry
Browse files Browse the repository at this point in the history
refactor: bump "version" to 3
refactor: delete Hardhat and its Node.js paraphernalia
refactor: import specific symbols instead of global levels
refactor: move custom errors in "IPRBProxy" interface
refactor: move contracts to "src" folder
refactor: rename "PRBProxy__ExecutionNotAuthorized" to "PRBProxy__ExecutionUnauthorized"
refactor: rename "PRBProxy__TargetInvalid" to "PRBProxy__TargetNotContract"

build: add forge-std and prb-test dev dependencies
build: upgrade to Solidity v0.8.17
build: upgrade to Yarn v3.3.0
ci: delete deployment workflows (temporarily)
ci: refactor ci workflow to use Foundry
chore: delete ".czrc" file
chore: delete Hardhat tasks
chore: explain why we're using unchecked arithmetic for seed increment
chore: pass "files" as string in Prettier config
chore: remove "endOfLine" rule in Prettier config
chore: simplify scripts by removing paths to config files
chore: surround values with double quotes in Yaml files
chore: update config and ignore files for Foundry environment
chore: update "package.json" for Foundry environment
chore: use "yml" extension for lint-staged config
ci: rename workflow name to "CI"
style: add "proseWrap" rule in Prettier config
style: add "useTabs" rule in Prettier config
style: emboss header separators
style: disable "contract-name-camelcase" in Solhint config
style: remove "endOfLine" rule in Prettier config
test: add "echoUint256Array" function in "TargetEcho"
test: add "revertWithNothing" in "TargetRevert"
test: add Solidity tests (WIP)
test: delete Node.js tests (WIP)
test: remove NatSpec in testing target contracts
test: rename "echoArray" to "echoBytesArray" in "TargetEcho"
test: set "UNLICENSED" SDPX identifier in test contracts
  • Loading branch information
PaulRBerg committed Nov 29, 2022
1 parent a0c6998 commit d4d7a24
Show file tree
Hide file tree
Showing 113 changed files with 4,745 additions and 17,329 deletions.
3 changes: 0 additions & 3 deletions .czrc

This file was deleted.

5 changes: 4 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# EditorConfig http://EditorConfig.org
# EditorConfig http://EditorConfig.org

# top-most EditorConfig file
root = true
Expand All @@ -14,3 +14,6 @@ trim_trailing_whitespace = true

[*.sol]
indent_size = 4

[*.tree]
indent_size = 1
12 changes: 2 additions & 10 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,10 +1,2 @@
ETHERSCAN_API_KEY="etherscan api key"
INFURA_API_KEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
MNEMONIC="here is where your twelve words mnemonic should be put my friend"

# Block explorer API keys
BSCSCAN_API_KEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
ETHERSCAN_API_KEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
FTMSCAN_API_KEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
POLYGONSCAN_API_KEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
SNOWTRACE_API_KEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
export ETH_FROM="YOUR_DEFAULT_SENDER_ACCOUNT"
export ETH_RPC_URL="https://rinkeby.infura.io/v3/INFURA_API_KEY"
23 changes: 0 additions & 23 deletions .eslintignore

This file was deleted.

61 changes: 61 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: "CI"

env:
FOUNDRY_PROFILE: "ci"

on:
pull_request:
branches:
- "main"
- "staging"
push:
branches:
- "main"
- "staging"

jobs:
ci:
runs-on: "ubuntu-latest"
steps:
- name: "Check out the repo"
uses: "actions/checkout@v3"
with:
submodules: "recursive"

- name: "Install Foundry"
uses: "onbjerg/foundry-toolchain@v1"
with:
version: "nightly"

- name: "Install Node.js"
uses: "actions/setup-node@v3"
with:
cache: "yarn"
node-version: "lts/*"

- name: "Install the Node.js dependencies"
run: "yarn install --immutable"

- name: "Lint the contracts"
run: "yarn lint"

- name: "Add lint summary"
run: |
echo "## Lint" >> $GITHUB_STEP_SUMMARY
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
- name: "Show the Foundry config"
run: "forge config"

- name: "Run the tests"
run: "forge test"

- name: "Build the contracts"
run: |
forge --version
forge build --sizes
- name: "Add test summary"
run: |
echo "## Tests" >> $GITHUB_STEP_SUMMARY
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
66 changes: 0 additions & 66 deletions .github/workflows/deploy-factory-and-registry.yml

This file was deleted.

51 changes: 0 additions & 51 deletions .github/workflows/deploy-factory.yml

This file was deleted.

51 changes: 0 additions & 51 deletions .github/workflows/deploy-proxy.yml

This file was deleted.

56 changes: 0 additions & 56 deletions .github/workflows/deploy-registry.yml

This file was deleted.

Loading

0 comments on commit d4d7a24

Please sign in to comment.