Skip to content

Commit

Permalink
chore: set up ezETH/WETH deployment scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
junkim012 committed Jul 25, 2024
1 parent 269e008 commit c4d5798
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion deployment-config/00_Default.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"initialDefaultAdmin": "0x94544835Cf97c631f101c5f538787fE14E2E04f6",
"protocol": "0xE5a5F3A6C88B894710992e1C2626be0DEB99566E",
"ilkAddress": "0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A"
"ilkAddress": "0x2416092f143378750bb29b79eD961ab195CcEea5"
}
12 changes: 6 additions & 6 deletions script/deploy/04_DeployIonPool.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ contract DeployIonPoolScript is DeployScript {
bytes32 salt = config.readBytes32(".salt");

function createX() public returns (IonPool ionImpl, IonPool ionPool) {
// ionImpl = IonPool(config.readAddress(".ionImpl"));
ionImpl = IonPool(config.readAddress(".ionImpl"));

_validateInterface(IERC20(underlying));
_validateInterface(interestRateModule);
_validateInterface(whitelist);

// ionImpl = IonPool();

if (deployCreate2) {
ionImpl = new IonPool{ salt: DEFAULT_SALT }();
} else {
ionImpl = new IonPool();
}
// if (deployCreate2) {
// ionImpl = new IonPool{ salt: DEFAULT_SALT }();
// } else {
// ionImpl = new IonPool();
// }

_validateInterfaceIonPool(ionImpl);

Expand Down
12 changes: 6 additions & 6 deletions script/deploy/05_DeployInitialReserveAndSpotOracles.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ pragma solidity 0.8.21;

import { DeployScript } from "../Deploy.s.sol";
import { RAY } from "../../src/libraries/math/WadRayMath.sol";
import { WeEthWethReserveOracle } from "./../../src/oracles/reserve/lrt/WeEthWethReserveOracle.sol";
import { WeEthWethSpotOracle } from "./../../src/oracles/spot/lrt/WeEthWethSpotOracle.sol";
import {BaseEzEthWethReserveOracle} from "./../../src/oracles/reserve/lrt/base/BaseEzEthWethReserveOracle.sol";
import {BaseEzEthWethSpotOracle} from "./../../src/oracles/spot/lrt/base/BaseEzEthWethSpotOracle.sol";

import { stdJson as StdJson } from "forge-std/StdJson.sol";

Expand All @@ -30,21 +30,21 @@ contract DeployInitialReserveAndSpotOraclesScript is DeployScript {

if (deployCreate2) {
reserveOracle = address(
new WeEthWethReserveOracle{ salt: DEFAULT_SALT }(
new BaseEzEthWethReserveOracle{ salt: DEFAULT_SALT }(
0, new address[](3), 0, maxChange, maxTimeFromLastUpdate, gracePeriod
)
);
spotOracle = address(
new WeEthWethSpotOracle{ salt: DEFAULT_SALT }(
new BaseEzEthWethSpotOracle{ salt: DEFAULT_SALT }(
ltv, address(reserveOracle), maxTimeFromLastUpdate, gracePeriod
)
);
} else {
reserveOracle = address(
new WeEthWethReserveOracle(0, new address[](3), 0, maxChange, maxTimeFromLastUpdate, gracePeriod)
new BaseEzEthWethReserveOracle(0, new address[](3), 0, maxChange, maxTimeFromLastUpdate, gracePeriod)
);
spotOracle =
address(new WeEthWethSpotOracle(ltv, address(reserveOracle), maxTimeFromLastUpdate, gracePeriod));
address(new BaseEzEthWethSpotOracle(ltv, address(reserveOracle), maxTimeFromLastUpdate, gracePeriod));
}
}
}
16 changes: 8 additions & 8 deletions script/deploy/08_DeployHandlers.s.sol
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.21;

import { BASE_WETH, BASE_WEETH_WETH_BALANCER_POOL_ID, BASE_WSTETH_WETH_UNISWAP } from "../../src/Constants.sol";
import { BASE_WETH, BASE_EZETH_WETH_AERODROME } from "../../src/Constants.sol";
import { DeployScript } from "../Deploy.s.sol";
import { IonPool } from "../../src/IonPool.sol";
import { GemJoin } from "../../src/join/GemJoin.sol";
import { Whitelist } from "../../src/Whitelist.sol";
import { IonHandlerBase } from "../../src/flash/IonHandlerBase.sol";
import { WeEthWethHandler } from "./../../src/flash/lrt/WeEthWethHandler.sol";
import {BaseEzEthWethHandler} from "./../../src/flash/lrt/base/BaseEzEthWethHandler.sol";
import { stdJson as StdJson } from "forge-std/StdJson.sol";

// NOTE: Different handlers will have different constructor parameters.
Expand All @@ -28,23 +28,23 @@ contract DeployHandlersScript is DeployScript {
_validateInterfaceIonPool(ionPool);

if (deployCreate2) {
handler = new WeEthWethHandler{ salt: DEFAULT_SALT }(
handler = new BaseEzEthWethHandler{ salt: DEFAULT_SALT }(
ILK_INDEX_ZERO,
ionPool,
gemJoin,
whitelist,
BASE_WSTETH_WETH_UNISWAP,
BASE_WEETH_WETH_BALANCER_POOL_ID,
BASE_EZETH_WETH_AERODROME,
false,
BASE_WETH
);
} else {
handler = new WeEthWethHandler{ salt: DEFAULT_SALT }(
handler = new BaseEzEthWethHandler(
ILK_INDEX_ZERO,
ionPool,
gemJoin,
whitelist,
BASE_WSTETH_WETH_UNISWAP,
BASE_WEETH_WETH_BALANCER_POOL_ID,
BASE_EZETH_WETH_AERODROME,
false,
BASE_WETH
);
}
Expand Down

0 comments on commit c4d5798

Please sign in to comment.