Skip to content

Commit

Permalink
Add liquidation event handler (#7)
Browse files Browse the repository at this point in the history
* feat: add deposit events

* feat: add withdraw events

* feat: add repay event

* feat: add deposits, withdraws, and repay on pToken table

* feat: add borrow event

* feat: add script to test transfer

* feat: add transfer event

* refactor: use validate env helper on deposit and transfer script

* feat: add borrowIndex data and accrue interest event

* chore: add log pToken data for testing

* feat: add reserve changes events

* chore: add oracle engine abi

* feat: add log oracle configs and prices

* chore: add mock oracle abi

* refactor: create script utils with base scenario for simulations

* feat: add script to change oracle config to use mock

* feat: add liquidation script

* feat: add liquidation event handler

* refactor: rename onBehalfOf to user
  • Loading branch information
yvesfracari authored Jan 14, 2025
1 parent 33b21f3 commit acba8b6
Show file tree
Hide file tree
Showing 19 changed files with 1,615 additions and 545 deletions.
7 changes: 4 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ BASE_SEPOLIA_RPC_URL=
FUNDING_PRIVATE_KEY=
ADMIN_PRIVATE_KEY=
RISK_ENGINE_ADDRESS="0x8fc240c810fc3f7e4d966c45dd0e875863ea6305"
ORACLE_ENGINE_ADDRESS=0xd543b55490ed139a7fd3774f33c794341db46faa
STETH_ADDRESS=0x133d6f8071c028c1f89a70d9d2f25798ec74dd3e
USDC_ADDRESS=0xf10f12a5cb889ca699017898fee16ce82c9557ed
WETH_ADDRESS=0x565a622533868fa98d4d0d784712bebbaba0aa64
PSTETH_ADDRESS=0xA275ACB5ac2277a48Fe498113A7aD13c499657fe
PUSDC_ADDRESS=0x4999fcd9fd8E255AB8c3d2Cb9951E0322D038860
PWETH_ADDRESS=0x15696822B30C54C787a0Fdce2C6AEA2AB47E2220
STETH_PRICE=2200000000000000000000 # $2200 with 18 decimals
USDC_PRICE=1000000000000000000000000000000 # $1 with 30 decimals
WETH_PRICE=2200000000000000000000 # $2200 with 18 decimals
STETH_PRICE=3285322220050000000000 # $2200 with 18 decimals
USDC_PRICE=999990530000000000000000000000 # $1 with 30 decimals
WETH_PRICE=3285322220050000000000 # $2200 with 18 decimals
Loading

0 comments on commit acba8b6

Please sign in to comment.