Skip to content

Commit

Permalink
feat: update deployment scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
bhargavaparoksham committed Jan 23, 2025
1 parent 9a314cf commit 31e0f3e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions script/CreateAssetPool.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
pragma solidity ^0.8.20;

import "forge-std/Script.sol";
import "../src/interfaces/IAssetPool.sol";
import "../src/protocol/AssetPoolFactory.sol";
import "../src/protocol/LPRegistry.sol";
import "../src/protocol/AssetPool.sol";

contract CreatePoolScript is Script {
// Pool configuration'
Expand Down Expand Up @@ -78,8 +78,8 @@ contract CreatePoolScript is Script {
console.log("----------------------------------------------------");

// Verify the pool was created correctly
AssetPool pool = AssetPool(poolAddress);
(uint256 supply, AssetPool.CycleState state, uint256 cycle,,, uint256 price) = pool.getGeneralInfo();
IAssetPool pool = IAssetPool(poolAddress);
(uint256 supply, IAssetPool.CycleState state, uint256 cycle,,, uint256 price) = pool.getGeneralInfo();
console.log("Pool Initial State:");
console.log("Supply:", supply);
console.log("State:", uint256(state));
Expand Down
5 changes: 3 additions & 2 deletions script/DeployPoolFactory.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import "forge-std/Script.sol";
import "../src/protocol/AssetPoolFactory.sol";

contract AssetPoolDeployScript is Script {
address constant lpRegistry = 0x82d533e4a2973D5c1E29eB207af0B6f387E395C9;
address constant lpRegistry = 0x82d533e4a2973D5c1E29eB207af0B6f387E395C9; // Replace with actual LPRegistry address
address constant assetPoolImplementation = 0x82d533e4a2973D5c1E29eB207af0B6f387E395C9; // Replace with actual implementation address

function setUp() public {}

Expand All @@ -17,7 +18,7 @@ contract AssetPoolDeployScript is Script {
vm.startBroadcast(deployerPrivateKey);

// Deploy AssetPoolFactory with the LPRegistry address
AssetPoolFactory poolFactory = new AssetPoolFactory(lpRegistry);
AssetPoolFactory poolFactory = new AssetPoolFactory(lpRegistry, assetPoolImplementation);
console.log("AssetPoolFactory deployed at:", address(poolFactory));

// Stop broadcasting transactions
Expand Down

0 comments on commit 31e0f3e

Please sign in to comment.