-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Gateway contract + other small fixes (#35)
* add prettier:watch npm command to format files when on save * add base Account management * add canCall functionality to the account factory * use canCall from the factory and add simple withdraw function for any tokens * add simple withdrawEth function to allow any ETH deposited here to be withdraw by the owner * only withdraw to owner * remove useless canCall function as the mapping is already public * add basic testing of the account factory * more tests for the account factory * Create AccountImplementation.t.sol * add missing test for init * add test for withdraw fail * add natspec * add natspect for account factory * remove boring batchable to use oz/multicall also finish testing account implementation * implement multicall locally * rework AccountImplementation * rewrite natspec * Create MockBalancerVault.sol * add initiatedByOwnerOrOwner modifier * complete unit test * add flashloan fail test * add create balancer weighted pool script * WIP integration testing * use swap on univ2 instead of balancer * Update IntegrationTestSepoliaBorrowLeverage.sol * import TestnetToken from sepolia branch * cleanup * add borrowOnBehalf on a term * wip gatewayV1 * add testBorrowOnBehalfSuccess on lending term * WIP gateway v1 * finish gateway impl * add sepolia gateway deploy * various eswak review fixes * fix build and tests * fix getSelector function * fix scripts route * remove old unit tests * add script SimpleBorrowOnSDAI using the gateway * add gateway calls to the gateway * onboard a new term * fix simple borrow sDAI * add missing revert string on the gateway * Create SimpleBorrowOnSDAIWithLeverage.s.sol * fix missing revert msg * fix scripts * Create PauseGateway.s.sol * fix deployment to sepolia * Update package.json * prettier fix * wip fix proposal * remove extract address lib * remove AddressLib and create ECGTest * add/update deploy scripts * Move rate limit utils to rate-limits folder * Update README.md * Fix forge deal() on ERC20RebaseDistributor * Fix roles in deployment script * Add roles.sepolia.json * Update DeployGatewayV1.s.sol * Fix integration tests * Remove references to sDAI in integration tests * prettier * clean comments on the gatewayv1 * Remove callFee reference in readme * add unit test sepolia gateway (vip) * add test without permit * add integ test flashloan gateway * fix test:integration npm script to not redeploy by default * Fix integration tests (2) * GIP_0: set shorter delegateLockupPeriod on sepolia * cleanup console log and prettier:fix * missing console log removal * Fix offboard vote on past votes * Add events in LendingTerm for AH & hardCap setters * Fix 1259 (reorg after lending term factory use) * Add borrowWithBalancerFlashLoan & repayWithBalancerFlashLoan * Add GatewayV1.bidWithBalancerFlashLoan() * ProfitManager: handling of creditMultiplier = 0 * Cleanup OnboardNewTerm.s.sol & PauseGateway.s.sol * Run prettier:fix * Add entryPoint/afterEntry modifiers to Gateway * Fix gateway integration tests if creditMultiplier != 1, rounding down can happen * Remove MockExternalContract * GIP_0 coherence on term onboarding * Increase default auction duration to 2h * Add unit tests for GatewayV1 --------- Co-authored-by: Erwan Beauvois <[email protected]> Co-authored-by: Erwan Beauvois <[email protected]>
- Loading branch information
1 parent
5003806
commit dba62fb
Showing
64 changed files
with
4,389 additions
and
1,145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
[ | ||
{ | ||
"addr": "0x0000000000000000000000000000000000000000", | ||
"name": "ZERO_ADDRESS" | ||
}, | ||
{ | ||
"addr": "0x6ef71ca9cd708883e129559f5edbfb9d9d5c6148", | ||
"name": "TEAM_MULTISIG" | ||
}, | ||
{ | ||
"addr": "0xb027658e189F9814663631b12B9CDF8dd7CC977C", | ||
"name": "ESWAK" | ||
}, | ||
{ | ||
"addr": "0xbad06297eB7878502E045319a7c4a8904b49BEEF", | ||
"name": "BADBEEF" | ||
}, | ||
{ | ||
"addr": "0xb63C817ab0Bf103bF0149fb18fe22CdEAb5EF7b1", | ||
"name": "TOMTOM" | ||
}, | ||
{ | ||
"addr": "0xfc2290dbf4db882b6d3d07ecb1e00d0531b45680", | ||
"name": "CORE" | ||
}, | ||
{ | ||
"addr": "0x7b8b4418990e4daf35f5c7f0165dc487b1963641", | ||
"name": "ERC20_USDC" | ||
}, | ||
{ | ||
"addr": "0x1ced1eb530b5e71e6db9221a22c725e862fc0e60", | ||
"name": "ERC20_WBTC" | ||
}, | ||
{ | ||
"addr": "0x9f07498d9f4903b10db57a3bd1d91b6b64aed61e", | ||
"name": "ERC20_SDAI" | ||
}, | ||
{ | ||
"addr": "0x8738c00828c8e6883326ea5ba104cacff95808e0", | ||
"name": "PROFIT_MANAGER" | ||
}, | ||
{ | ||
"addr": "0x7dff544f61b262d7218811f78c94c3b2f4e3dca1", | ||
"name": "ERC20_GUSDC" | ||
}, | ||
{ | ||
"addr": "0x79e2b8553da5361d90ed08a9e3f2f3e5e5ff2f8f", | ||
"name": "ERC20_GUILD" | ||
}, | ||
{ | ||
"addr": "0x81aa07eb1b22e3d3b9c7cc728640721064cad4a9", | ||
"name": "RATE_LIMITED_CREDIT_MINTER" | ||
}, | ||
{ | ||
"addr": "0x9594af6eea97b43673bb046db152428b13c48377", | ||
"name": "RATE_LIMITED_GUILD_MINTER" | ||
}, | ||
{ | ||
"addr": "0x7386c5ffbb710e543a0f3c40c1e7ee1ddcaedf51", | ||
"name": "SURPLUS_GUILD_MINTER" | ||
}, | ||
{ | ||
"addr": "0x912e76518b318c209ef7ff04d119967acae3569e", | ||
"name": "AUCTION_HOUSE" | ||
}, | ||
{ | ||
"addr": "0x87b22b22666c15c11b8632c8a132ee820b783061", | ||
"name": "LENDING_TERM_V1" | ||
}, | ||
{ | ||
"addr": "0xc19d710f13a725fd67021e8c45bdedffe95202e3", | ||
"name": "PSM_USDC" | ||
}, | ||
{ | ||
"addr": "0x14025e6f3ac44d6d2212605bce695b7d379c2350", | ||
"name": "DAO_GOVERNOR_GUILD" | ||
}, | ||
{ | ||
"addr": "0x34badf7afe7c981d7b399f092f4557bef09c1b6f", | ||
"name": "DAO_TIMELOCK" | ||
}, | ||
{ | ||
"addr": "0x76b513119671176a87fa538e5814c50dd49e3e66", | ||
"name": "DAO_VETO_CREDIT" | ||
}, | ||
{ | ||
"addr": "0x6ef90254dd61782ead7d95974d1d47f4f7d2d377", | ||
"name": "DAO_VETO_GUILD" | ||
}, | ||
{ | ||
"addr": "0x3274ebe53c4fa1d0a59ad8fadbc6f944186b408e", | ||
"name": "ONBOARD_GOVERNOR_GUILD" | ||
}, | ||
{ | ||
"addr": "0x1026847b30385606d3a22e62d5ede3b1b8e2448a", | ||
"name": "ONBOARD_TIMELOCK" | ||
}, | ||
{ | ||
"addr": "0xd09195208a829990b0b72ef6d08d9637779338c8", | ||
"name": "ONBOARD_VETO_CREDIT" | ||
}, | ||
{ | ||
"addr": "0x68e47e70f66a484fcb0cef215a46d76300b2e2b2", | ||
"name": "ONBOARD_VETO_GUILD" | ||
}, | ||
{ | ||
"addr": "0xb2aed7b9dce6826d510a2559da83afd5a2af9405", | ||
"name": "OFFBOARD_GOVERNOR_GUILD" | ||
}, | ||
{ | ||
"addr": "0x938998fca53d8bfd91bc1726d26238e9eada596c", | ||
"name": "TERM_SDAI_1" | ||
}, | ||
{ | ||
"addr": "0x820e8f9399514264fd8cb21cee5f282c723131f6", | ||
"name": "TERM_WBTC_1" | ||
}, | ||
{ | ||
"addr": "0xd3ecfc72fe299b58764e12ac38d59f20fc287052", | ||
"name": "LENDING_TERM_FACTORY" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
{ | ||
"GOVERNOR": [ | ||
"OFFBOARD_GOVERNOR_GUILD", | ||
"DAO_TIMELOCK", | ||
"ONBOARD_TIMELOCK", | ||
"ESWAK", | ||
"BADBEEF", | ||
"TOMTOM" | ||
], | ||
"GUARDIAN": [ | ||
"TEAM_MULTISIG" | ||
], | ||
"CREDIT_MINTER": [ | ||
"RATE_LIMITED_CREDIT_MINTER", | ||
"PSM_USDC" | ||
], | ||
"CREDIT_BURNER": [ | ||
"PROFIT_MANAGER", | ||
"PSM_USDC", | ||
"TERM_SDAI_1", | ||
"TERM_WBTC_1" | ||
], | ||
"RATE_LIMITED_CREDIT_MINTER": [ | ||
"TERM_SDAI_1", | ||
"TERM_WBTC_1" | ||
], | ||
"GUILD_MINTER": [ | ||
"RATE_LIMITED_GUILD_MINTER", | ||
"ESWAK", | ||
"BADBEEF" | ||
], | ||
"RATE_LIMITED_GUILD_MINTER": [ | ||
"SURPLUS_GUILD_MINTER", | ||
"TEAM_MULTISIG" | ||
], | ||
"GAUGE_ADD": [ | ||
"DAO_TIMELOCK", | ||
"ONBOARD_TIMELOCK" | ||
], | ||
"GAUGE_REMOVE": [ | ||
"DAO_TIMELOCK", | ||
"OFFBOARD_GOVERNOR_GUILD" | ||
], | ||
"GAUGE_PARAMETERS": [ | ||
"DAO_TIMELOCK" | ||
], | ||
"GAUGE_PNL_NOTIFIER": [ | ||
"TERM_SDAI_1", | ||
"TERM_WBTC_1" | ||
], | ||
"GUILD_GOVERNANCE_PARAMETERS": [ | ||
"DAO_TIMELOCK" | ||
], | ||
"GUILD_SURPLUS_BUFFER_WITHDRAW": [ | ||
"SURPLUS_GUILD_MINTER" | ||
], | ||
"CREDIT_GOVERNANCE_PARAMETERS": [ | ||
"DAO_TIMELOCK" | ||
], | ||
"CREDIT_REBASE_PARAMETERS": [ | ||
"DAO_TIMELOCK", | ||
"PSM_USDC" | ||
], | ||
"PROPOSER": [ | ||
"DAO_GOVERNOR_GUILD", | ||
"ONBOARD_GOVERNOR_GUILD" | ||
], | ||
"EXECUTOR": [ | ||
"ZERO_ADDRESS" | ||
], | ||
"CANCELLER": [ | ||
"DAO_VETO_CREDIT", | ||
"DAO_VETO_GUILD", | ||
"ONBOARD_VETO_CREDIT", | ||
"ONBOARD_VETO_GUILD", | ||
"DAO_GOVERNOR_GUILD", | ||
"ONBOARD_GOVERNOR_GUILD" | ||
] | ||
} |
Oops, something went wrong.