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

THE BIG ONE 🐘 💣 🚝 #501

Merged
merged 62 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from 58 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
de60af3
feat: move proxies around
bowd Aug 19, 2024
14809d3
feat: rename StableTokenPSOProxy to StableTokenPHPProxy
bayological Aug 19, 2024
8b2a329
chore: wip
bowd Aug 20, 2024
980074b
chore: add mento-std
bowd Aug 20, 2024
3b4f737
chore: wip
bowd Aug 20, 2024
91c9c96
Merge branch 'feat/cleanup-proxies' into feat/upgrade-tests-solidity-…
bowd Aug 20, 2024
0cb1061
Merge branch 'feat/cleanup-proxies' into feat/upgrade-tests-solidity-…
bowd Aug 20, 2024
54817a6
chore: migrate some contracts yey
bowd Aug 20, 2024
3ae7685
chore: wip -- problems with linking
bowd Aug 20, 2024
dbbd08a
chore: wip test migration
bowd Aug 21, 2024
eee8835
feat: add seperate relayerDeployer ACL for RelayerFactory
bowd Aug 21, 2024
02fdb5b
fix: lint
bowd Aug 21, 2024
1706b82
chore: more tests migrated
bowd Aug 21, 2024
8dd8f86
chore: more more moreeeee
bowd Aug 21, 2024
ba57bec
chore: unlimited poweeeerrrr
bowd Aug 21, 2024
3639e7a
chore: migrate this migrate that
bowd Aug 21, 2024
df60ca0
chore: fork tests refactoring
bowd Aug 21, 2024
4d31295
chore: update fixtures documentation
bowd Aug 21, 2024
65f024f
feat: remove CVS helper and magic fixtures
bowd Aug 22, 2024
bd019be
chore: remove explicit lib import, it works anyway
bowd Aug 22, 2024
e00a425
feat: change tests structure
bowd Aug 22, 2024
54f5108
feat: make slither happy
bowd Aug 22, 2024
c88d302
feat: pr suggestings
bowd Aug 22, 2024
05047f9
fix: lint
bowd Aug 22, 2024
71ff972
Merge branch 'feat/split-relayer-acl' into feat/upgrade-tests-solidit…
bowd Aug 22, 2024
6a9e47c
fix: modern linting
bowd Aug 22, 2024
8ab43ed
fix: all solhint warnings
bowd Aug 22, 2024
2a97b41
fix: package.json command
bowd Aug 22, 2024
eb0314d
Merge branch 'develop' into feat/upgrade-tests-solidity-version
bowd Aug 22, 2024
6f9f0b9
fix: lint
bowd Aug 22, 2024
1f9136b
fix: remove reference to celo-foundry
bowd Aug 22, 2024
ed12919
fix: remove submodules
bowd Aug 22, 2024
beef6d7
chore: add forge-std
bowd Aug 22, 2024
b652484
feat: remove forge-std-next reference
bowd Aug 22, 2024
9e89cf5
fix: missing imports
bowd Aug 22, 2024
d0bf9dc
Merge branch 'develop' into feat/upgrade-tests-solidity-version
bowd Aug 22, 2024
e4066ee
fix: lint
bowd Aug 22, 2024
a852e04
fix: install deps in CI and compile everything with via_ir
bowd Aug 22, 2024
7af04f5
fix: add FOUNDRY_PROFILE to storage-layout CI script
bowd Aug 22, 2024
042a54c
fix: skip build in echidna step
bowd Aug 22, 2024
a4b0abf
fix: slither comment and settings
bowd Aug 22, 2024
dae6eb3
fix: let echidna compile
bowd Aug 22, 2024
1d29370
fix: make slither green
bowd Aug 22, 2024
70182ba
fix: more slither fine-tuning
bowd Aug 22, 2024
7272d71
fix: remove useless silent check on pre-push
bowd Aug 22, 2024
4ee929e
fix: remove uselss command
bowd Aug 22, 2024
d018d20
fix: install deps in CI
bowd Aug 22, 2024
f8e5b6a
fix: add different command in lint checks
bowd Aug 22, 2024
04ab45d
fix: remaining slither warning
bowd Aug 22, 2024
82c33e3
fix: upload-sarif version and echidna command
bowd Aug 22, 2024
c923212
feat: ignore compile in echidna
bowd Aug 22, 2024
95e3422
fix: vm.warp with optimized block.timestamp
bowd Aug 22, 2024
9643841
feat: fix typo in test and reduce yul optimizer steps
bowd Aug 22, 2024
1bb461f
feat: fix vm.warp issue in test
bowd Aug 22, 2024
c9d704d
feat: fix echidna and test
bowd Aug 22, 2024
bf93221
fix: tweak echidna test command
bowd Aug 22, 2024
4ff9d6d
fix: fix test with report from the future
bowd Aug 22, 2024
b87466c
fix: build only contracts with sizes
bowd Aug 22, 2024
ad406a0
chore: expose more methods on interfaces
bowd Aug 26, 2024
e396d4b
Revert "feat: remove maxTimestampSpread and only rely on expiry" (#504)
bowd Aug 26, 2024
a2b8efc
Merge branch 'develop' into feat/upgrade-tests-solidity-version
bowd Aug 26, 2024
5ecf432
fix: revert change and add slither ignore
bowd Aug 26, 2024
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
21 changes: 19 additions & 2 deletions .github/workflows/echidna.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,32 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: recursive

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

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

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: "Build for echidna"
run: forge build --build-info --skip */test/**/*.t.sol */script/**
run: |
forge build --build-info --skip \
"test/fork/**/*" \
"test/integration/**/*" \
"test/unit/**/*" \
"test/utils/**/*" \
"script/**/"

- name: "Run Echidna"
uses: crytic/echidna-action@v2
with:
files: .
solc-version: 0.5.17
contract: ${{ matrix.contract }}
config: echidna.yaml
test-mode: assertion
4 changes: 2 additions & 2 deletions .github/workflows/lint_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
run: "yarn install --immutable"

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

- name: "Add lint summary"
run: |
Expand All @@ -50,7 +50,7 @@ jobs:
- name: "Build the contracts"
run: |
forge --version
forge build --sizes
forge build --sizes --skip test/**/*

- name: "Add test summary"
run: |
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/slither.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,20 @@ jobs:
uses: "actions/checkout@v3"
with:
submodules: "recursive"
- name: "Install Node.js"
uses: "actions/setup-node@v3"
with:
cache: "yarn"
node-version: "20"

- name: "Install the Node.js dependencies"
run: "yarn install --immutable"
- name: Run Slither
uses: crytic/slither-action@v0.3.1
uses: crytic/slither-action@v0.4.0
id: slither
with:
sarif: results.sarif
fail-on: "low"
# continue-on-error: true
# -----------------------
# Ideally, we'd like to continue on error to allow uploading the SARIF file here.
Expand All @@ -36,6 +45,6 @@ jobs:
# know it failed.
# -----------------------
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v2
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ steps.slither.outputs.sarif }}
12 changes: 12 additions & 0 deletions .github/workflows/storage-layout.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
name: "Storage Layout"

env:
FOUNDRY_PROFILE: "ci"

on:
workflow_dispatch:
push:
Expand Down Expand Up @@ -32,6 +36,14 @@ jobs:
uses: onbjerg/foundry-toolchain@v1
with:
version: "nightly"
- name: "Install Node.js"
uses: "actions/setup-node@v3"
with:
cache: "yarn"
node-version: "20"

- name: "Install the Node.js dependencies"
run: "yarn install --immutable"
- name: Check storage layout
uses: Rubilmax/[email protected]
with:
Expand Down
12 changes: 6 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
[submodule "lib/openzeppelin-contracts"]
path = lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
[submodule "lib/celo-foundry"]
path = lib/celo-foundry
url = https://github.com/bowd/celo-foundry
[submodule "lib/openzeppelin-contracts-next"]
path = lib/openzeppelin-contracts-next
url = https://github.com/OpenZeppelin/openzeppelin-contracts
[submodule "lib/openzeppelin-contracts-upgradeable"]
path = lib/openzeppelin-contracts-upgradeable
url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable
[submodule "lib/forge-std-next"]
path = lib/forge-std-next
url = https://github.com/foundry-rs/forge-std
[submodule "lib/safe-contracts"]
path = lib/safe-contracts
url = https://github.com/safe-global/safe-contracts
Expand All @@ -23,3 +17,9 @@
branch = "release-v4"
path = lib/prb-math
url = https://github.com/PaulRBerg/prb-math
[submodule "lib/mento-std"]
path = lib/mento-std
url = https://github.com/mento-protocol/mento-std
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
2 changes: 1 addition & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn lint:check
yarn lint
4 changes: 2 additions & 2 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ singleQuote: false
tabWidth: 2
trailingComma: all

plugins: ["prettier-plugin-solidity"]

overrides:
- files: ["*.sol"]
options:
compiler: 0.5.17
tabWidth: 2
printWidth: 120
- files: [contracts/tokens/patched/*.sol]
options:
compiler: 0.8.18
Expand Down
18 changes: 15 additions & 3 deletions .solhint.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@
"extends": "solhint:recommended",
"plugins": ["prettier"],
"rules": {
"no-global-import": "off",
"no-console": "off",
"code-complexity": ["error", 8],
"compiler-version": ["error", ">=0.5.13"],
"func-visibility": ["error", { "ignoreConstructors": true }],
"max-line-length": ["error", 120],
"func-visibility": [
"error",
{
"ignoreConstructors": true
}
],
"max-line-length": ["error", 121],
"not-rely-on-time": "off",
"function-max-lines": ["error", 120],
"no-empty-blocks": "off",
Expand All @@ -15,6 +22,11 @@
"endOfLine": "auto"
}
],
"reason-string": ["warn", { "maxLength": 64 }]
"reason-string": [
"warn",
{
"maxLength": 64
}
]
}
}
22 changes: 18 additions & 4 deletions .solhint.test.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,21 @@
"extends": "solhint:recommended",
"plugins": ["prettier"],
"rules": {
"one-contract-per-file": "off",
"no-global-import": "off",
"no-console": "off",
"code-complexity": ["error", 8],
"compiler-version": ["error", ">=0.5.13"],
"func-visibility": ["error", { "ignoreConstructors": true }],
"max-line-length": ["error", 120],
"func-visibility": [
"error",
{
"ignoreConstructors": true
}
],
"max-line-length": ["error", 121],
"not-rely-on-time": "off",
"function-max-lines": ["error", 120],
"function-max-lines": ["error", 121],
"gas-custom-errors": "off",
"max-states-count": "off",
"var-name-mixedcase": "off",
"func-name-mixedcase": "off",
Expand All @@ -21,6 +30,11 @@
"endOfLine": "auto"
}
],
"reason-string": ["warn", { "maxLength": 64 }]
"reason-string": [
"warn",
{
"maxLength": 64
}
]
}
}
9 changes: 0 additions & 9 deletions contracts/common/CalledByVm.sol

This file was deleted.

27 changes: 0 additions & 27 deletions contracts/common/ExternalCall.sol

This file was deleted.

Loading
Loading