Skip to content

Commit

Permalink
feat: update pool creation script
Browse files Browse the repository at this point in the history
  • Loading branch information
bhargavaparoksham committed Jan 20, 2025
1 parent 3a32e52 commit d7fa3cb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions script/CreateAssetPool.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ contract CreatePoolScript is Script {
address constant PRICE_ORACLE = 0x453cD289694c036980226FDEDF3A7a3eC686Ae05; // Replace with actual oracle address
uint256 constant CYCLE_PERIOD = 2 hours;
uint256 constant REBALANCING_PERIOD = 30 minutes;
uint256 constant SETTLEMENT_PERIOD = 30 minutes;

// Deployed contract addresses (replace with actual addresses after deployment)
address constant ASSET_POOL_FACTORY = 0xda62cb7c018505042eF56B02A8207A9a704e734c; // Replace with deployed PoolFactory address
Expand Down Expand Up @@ -45,7 +46,8 @@ contract CreatePoolScript is Script {
ASSET_SYMBOL,
PRICE_ORACLE,
CYCLE_PERIOD,
REBALANCING_PERIOD
REBALANCING_PERIOD,
SETTLEMENT_PERIOD
);

registry.addPool(poolAddress);
Expand Down Expand Up @@ -75,11 +77,12 @@ contract CreatePoolScript is Script {
console.log("Price Oracle:", PRICE_ORACLE);
console.log("Cycle Period:", CYCLE_PERIOD);
console.log("Rebalancing Period:", REBALANCING_PERIOD);
console.log("Settlement Period:", SETTLEMENT_PERIOD);
console.log("----------------------------------------------------");

// Verify the pool was created correctly
AssetPool pool = AssetPool(poolAddress);
(uint256 supply, AssetPool.CycleState state, uint256 cycle,,, uint256 price) = pool.getGeneralInfo();
(uint256 supply, AssetPool.CycleState state, uint256 cycle,,,, uint256 price) = pool.getGeneralInfo();
console.log("Pool Initial State:");
console.log("Supply:", supply);
console.log("State:", uint256(state));
Expand Down

0 comments on commit d7fa3cb

Please sign in to comment.