Skip to content

Commit d16d9d6

Browse files
avniculaeyan-man
andauthored
feat: Liquidations & Spoke Refactoring (#672)
Co-authored-by: YBM <[email protected]>
1 parent 359ef23 commit d16d9d6

File tree

65 files changed

+4260
-8445
lines changed

Some content is hidden

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

65 files changed

+4260
-8445
lines changed

.github/workflows/tests-merge.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
- main
77

88
jobs:
9+
lint:
10+
name: Prettier lint check
11+
uses: bgd-labs/github-workflows/.github/workflows/foundry-lint-prettier.yml@main
912
test:
1013
name: Foundry build n test
1114
runs-on: ubuntu-latest

.github/workflows/tests-pr.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
pull_request:
55

66
jobs:
7+
lint:
8+
name: Prettier lint check
9+
uses: bgd-labs/github-workflows/.github/workflows/foundry-lint-prettier.yml@main
710
test:
811
name: Foundry build n test
912
runs-on: ubuntu-latest

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ out
22
lib
33
cache
44
node_modules
5+
snapshots
6+
src/dependencies

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"name": "aave-v4",
33
"version": "1.0.0",
44
"scripts": {
5-
"lint": "prettier ./",
6-
"lint:fix": "npm run lint -- --write",
5+
"lint": "prettier . --check",
6+
"lint:fix": "prettier . --write",
77
"rs:bind": "forge bind --bindings-path ./out/__BINDINGS__ --alloy --skip '(tests|scripts)/**/*.sol'",
88
"rs:abis": "forge build --out ./out/__FOLDER_ABIS__ --skip '(tests|scripts)/**/*.sol' --extra-output-files abi && rm -rf ./out/__ABIS__ && mkdir -p ./out/__ABIS__ && find ./out/__FOLDER_ABIS__ -name '*.abi.json' -exec cp {} ./out/__ABIS__/ \\;",
99
"rs:generate": "npm run rs:bind && npm run rs:abis"

snapshots/Hub.Operations.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"add": "119571",
33
"draw": "112318",
4-
"refreshPremium": "81859",
4+
"refreshPremium": "81862",
55
"remove: full": "80336",
66
"remove: partial": "86836",
7-
"restore: full": "111589",
8-
"restore: partial": "117441"
7+
"restore: full": "111592",
8+
"restore: partial": "117444"
99
}

snapshots/Spoke.Getters.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"getUserAccountData: supplies: 0, borrows: 0": "9327",
3-
"getUserAccountData: supplies: 1, borrows: 0": "45207",
4-
"getUserAccountData: supplies: 2, borrows: 0": "76269",
5-
"getUserAccountData: supplies: 2, borrows: 1": "99927",
6-
"getUserAccountData: supplies: 2, borrows: 2": "121949"
2+
"getUserAccountData: supplies: 0, borrows: 0": "9329",
3+
"getUserAccountData: supplies: 1, borrows: 0": "45025",
4+
"getUserAccountData: supplies: 2, borrows: 0": "75807",
5+
"getUserAccountData: supplies: 2, borrows: 1": "99083",
6+
"getUserAccountData: supplies: 2, borrows: 2": "120915"
77
}

snapshots/Spoke.Operations.json

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
{
2-
"borrow: first": "249319",
3-
"borrow: second action, same reserve": "212791",
4-
"liquidationCall: full": "310267",
5-
"liquidationCall: partial": "385013",
6-
"permitReserve + repay (multicall)": "270103",
7-
"permitReserve + supply (multicall)": "140588",
8-
"permitReserve + supply + enable collateral (multicall)": "174118",
9-
"repay: full": "173837",
10-
"repay: partial": "228885",
2+
"borrow: first": "248096",
3+
"borrow: second action, same reserve": "211568",
4+
"liquidationCall: full": "316501",
5+
"liquidationCall: partial": "340172",
6+
"permitReserve + repay (multicall)": "268517",
7+
"permitReserve + supply (multicall)": "140632",
8+
"permitReserve + supply + enable collateral (multicall)": "174117",
9+
"repay: full": "172778",
10+
"repay: partial": "227277",
1111
"setUserPositionManagerWithSig: disable": "42808",
1212
"setUserPositionManagerWithSig: enable": "66831",
13-
"supply + enable collateral (multicall)": "152551",
14-
"supply: 0 borrows, collateral disabled": "116422",
15-
"supply: 0 borrows, collateral enabled": "119569",
16-
"supply: 1 borrow": "119558",
17-
"supply: second action, same reserve": "102469",
18-
"updateUserDynamicConfig: 1 collateral": "53113",
19-
"updateUserDynamicConfig: 2 collaterals": "58377",
20-
"updateUserRiskPremium: 1 borrow": "122588",
21-
"updateUserRiskPremium: 2 borrows": "158573",
22-
"usingAsCollateral: 0 borrows, enable": "54071",
23-
"usingAsCollateral: 1 borrow, disable": "132931",
24-
"usingAsCollateral: 1 borrow, enable": "24831",
25-
"withdraw: 0 borrows, full": "137044",
26-
"withdraw: 0 borrows, partial": "137967",
27-
"withdraw: 1 borrow, partial": "239232"
13+
"supply + enable collateral (multicall)": "152550",
14+
"supply: 0 borrows, collateral disabled": "116444",
15+
"supply: 0 borrows, collateral enabled": "119591",
16+
"supply: 1 borrow": "119580",
17+
"supply: second action, same reserve": "102491",
18+
"updateUserDynamicConfig: 1 collateral": "53152",
19+
"updateUserDynamicConfig: 2 collaterals": "58433",
20+
"updateUserRiskPremium: 1 borrow": "121368",
21+
"updateUserRiskPremium: 2 borrows": "157278",
22+
"usingAsCollateral: 0 borrows, enable": "54026",
23+
"usingAsCollateral: 1 borrow, disable": "131660",
24+
"usingAsCollateral: 1 borrow, enable": "24786",
25+
"withdraw: 0 borrows, full": "135190",
26+
"withdraw: 0 borrows, partial": "137293",
27+
"withdraw: 1 borrow, partial": "238008"
2828
}

0 commit comments

Comments
 (0)