Skip to content

Commit 8008c66

Browse files
authored
Merge pull request #92 from liquid-labs-inc/dev-main
Merge dev-main
2 parents e443724 + 7effc54 commit 8008c66

158 files changed

Lines changed: 22029 additions & 7677 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.config/cspell/cSpell_dict.txt

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
CLOB
2+
ICLOB
3+
Clob
4+
solady
5+
multicalls
6+
multicalling
7+
Liquidatable
8+
Subaccount
9+
Rpnl
10+
rpnl
11+
Initializable
12+
Reentrancy
13+
IERC
14+
keccak
15+
sload
16+
sstore
17+
iszero
18+
tload
19+
tstore
20+
mstore
21+
mload
22+
funder
23+
IGTL
24+
Unfillable
25+
staticcall
26+
delegatecall
27+
Twap
28+
twapped
29+
dont
30+
Unmatching
31+
clobs
32+
liquidatee
33+
perps
34+
TPSL
35+
chainid
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: PR Script Validation
2+
on:
3+
pull_request:
4+
branches: [dev-main]
5+
6+
jobs:
7+
check-broadcasts:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
with:
12+
fetch-depth: 0
13+
14+
- name: Check for broadcasted files
15+
run: |
16+
if git diff --name-only origin/dev-main...HEAD -- broadcast/ | grep -q '.'; then
17+
echo "❌ ERROR: broadcast/ files detected in PR"
18+
echo "Broadcast files should only be created through main branch deployments"
19+
echo ""
20+
echo "Changed broadcast files:"
21+
git diff --name-only origin/dev-main...HEAD -- broadcast/ || true
22+
exit 1
23+
fi
24+
echo "✅ No broadcast files in PR"
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# on:
2+
# pull_request:
3+
# branches: [main, dev-main]
4+
# name: Code Coverage
5+
6+
# jobs:
7+
# coverage:
8+
# runs-on: ubuntu-latest-4-cores
9+
# timeout-minutes: 30
10+
# env:
11+
# UNIV2_VANILLA_ROUTER_TESTNET: "0xA6b579684E943F7D00d616A48cF99b5147fC57A5"
12+
# RPC_TESTNET: "https://carrot.megaeth.com/rpc"
13+
# USDC_TESTNET: "0x9594B561eecA510C04f5d12D0Ac2C594A395E186"
14+
# DEPLOYER: "0xD999ec8aFAcC3ddD99226adde834f1d29647d3ba"
15+
# GTE_LAUNCHPAD_TESTNET: "0x0B6cD1DefCe3189Df60A210326E315383fbC14Ed"
16+
# GTE_ROUTER_TESTNET: "0x86470efcEa37e50F94E74649463b737C87ada367"
17+
# GTE_FACTORY_TESTNET: "0xF7568f77fDb10C084a20C81e1d58576aB4EC850f"
18+
# WETH_TESTNET: "0x776401b9BC8aAe31A685731B7147D4445fD9FB19"
19+
# CAP_TESTNET: "0xE9b6e75C243B6100ffcb1c66e8f78F96FeeA727F"
20+
# GTE_SIMPLE_BONDING_CURVE_TESTNET: "0x9E854c80Ab8f0859c889fae163F8F86E5A5427ea"
21+
# CLOB_MANAGER_TESTNET: "0xfB78cfDc3f64e71F83DbB49D3Ab81b63AeD971af"
22+
# permissions:
23+
# contents: read
24+
# pull-requests: write
25+
# steps:
26+
# - uses: actions/checkout@v4
27+
# with:
28+
# submodules: recursive
29+
30+
# - name: Install Foundry
31+
# uses: foundry-rs/foundry-toolchain@v1
32+
# with:
33+
# version: stable
34+
# cache: true
35+
36+
# - name: Run coverage
37+
# run: forge coverage --ir-minimum --report lcov -C contracts/
38+
39+
# - name: Report coverage
40+
# uses: romeovs/lcov-reporter-action@v0.3.1
41+
# with:
42+
# title: Coverage Results
43+
# lcov-file: lcov.info
44+
# github-token: ${{ secrets.GITHUB_TOKEN }}
45+
# delete-old-comments: true

.github/workflows/test-runner.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
on:
2+
pull_request:
3+
branches: [main, dev-main]
4+
5+
name: Test Runner
6+
7+
jobs:
8+
run-tests:
9+
runs-on: ubuntu-latest
10+
env:
11+
UNIV2_VANILLA_ROUTER_TESTNET: "0xA6b579684E943F7D00d616A48cF99b5147fC57A5"
12+
RPC_TESTNET: "https://carrot.megaeth.com/rpc"
13+
USDC_TESTNET: "0x9594B561eecA510C04f5d12D0Ac2C594A395E186"
14+
DEPLOYER: "0xD999ec8aFAcC3ddD99226adde834f1d29647d3ba"
15+
GTE_LAUNCHPAD_TESTNET: "0x0B6cD1DefCe3189Df60A210326E315383fbC14Ed"
16+
GTE_ROUTER_TESTNET: "0x86470efcEa37e50F94E74649463b737C87ada367"
17+
GTE_FACTORY_TESTNET: "0xF7568f77fDb10C084a20C81e1d58576aB4EC850f"
18+
WETH_TESTNET: "0x776401b9BC8aAe31A685731B7147D4445fD9FB19"
19+
CAP_TESTNET: "0xE9b6e75C243B6100ffcb1c66e8f78F96FeeA727F"
20+
GTE_SIMPLE_BONDING_CURVE_TESTNET: "0x9E854c80Ab8f0859c889fae163F8F86E5A5427ea"
21+
CLOB_MANAGER_TESTNET: "0xfB78cfDc3f64e71F83DbB49D3Ab81b63AeD971af"
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
submodules: recursive
26+
27+
- name: Install Foundry
28+
uses: foundry-rs/foundry-toolchain@v1
29+
with:
30+
version: stable
31+
cache: true
32+
33+
- name: Run tests
34+
run: forge test -vvv

.pre-commit-config.yaml

Lines changed: 41 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,29 @@ repos:
2727
hooks:
2828
- id: prettier
2929

30+
- repo: https://github.com/streetsidesoftware/cspell-cli
31+
rev: v8.17.3
32+
hooks:
33+
- id: cspell # Spell check changed files
34+
name: check sol file spelling
35+
args:
36+
- "contracts/**/*.sol"
37+
- --locale=en
38+
- --exclude
39+
- ".pre-commit-config.yaml"
40+
- id: cspell # Spell check the commit message
41+
name: check commit message spelling
42+
types: [file]
43+
args:
44+
- --locale=en
45+
- --no-must-find-files
46+
- --no-progress
47+
- --no-summary
48+
- --files
49+
- .git/COMMIT_EDITMSG
50+
stages: [commit-msg]
51+
always_run: true # This might not be necessary.
52+
3053
- repo: local
3154
hooks:
3255
- id: forge-fmt
@@ -39,15 +62,15 @@ repos:
3962
- repo: https://github.com/crytic/slither
4063
rev: 16fd330723aca93dc3342dee77340e4b344dc732
4164
hooks:
42-
# - id: slither
43-
# name: slither clob
44-
# args:
45-
# [
46-
# contracts/clob,
47-
# --config-file,
48-
# .config/.slither.config.json,
49-
# --skip-assembly,
50-
# ]
65+
- id: slither
66+
name: slither clob
67+
args:
68+
[
69+
contracts/clob,
70+
--config-file,
71+
.config/.slither.config.json,
72+
--skip-assembly,
73+
]
5174
- id: slither
5275
name: slither launchpad
5376
args:
@@ -57,12 +80,12 @@ repos:
5780
.config/.slither.config.json,
5881
--skip-assembly,
5982
]
60-
# - id: slither
61-
# name: slither router
62-
# args:
63-
# [
64-
# contracts/router,
65-
# --config-file,
66-
# .config/.slither.config.json,
67-
# --skip-assembly,
68-
# ]
83+
- id: slither
84+
name: slither router
85+
args:
86+
[
87+
contracts/router,
88+
--config-file,
89+
.config/.slither.config.json,
90+
--skip-assembly,
91+
]

BADFILE.txt

Whitespace-only changes.

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
deploy-test-upgrade:
2+
@./script/upgrades/script-callers/run-upgrades.sh test_upgrade
3+
4+
.PHONY: deploy-test-upgrade

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,10 @@
88
forge test
99
```
1010

11+
### Coverage
12+
13+
```shell
14+
forge coverage --ir-minimum --report lcov -C contracts/
15+
```
16+
1117
## Deployment

abi-scripts/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## Introduction
2+
3+
## Structure
4+
5+
### compare-abis
6+
7+
`Compares the abis of the current branch with dev-main's upon PR. This will perform checks that minor versions in the proxy contracts are incremented during abi changes. Additionally, this can perform checks that state is not being overridden in these contracts (todo)`
8+
9+
### submit-abis
10+
11+
`Submits any new abi version to the abi repo upon merge with dev-main`
12+
13+
### deploy-upgrades
14+
15+
`Ensures the indexer has the new abis and is ready for new impementations to be deployed and for upgrades to be run`

0 commit comments

Comments
 (0)