Skip to content

Commit

Permalink
chore: comments
Browse files Browse the repository at this point in the history
  • Loading branch information
zugdev committed Sep 17, 2024
1 parent 2dbd2da commit e03c3eb
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/contracts/test/amo/UbiquityAMOMinter.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ contract UbiquityAMOMinterTest is DiamondTestSetup {
function setUp() public override {
super.setUp();

// Initialize mock collateral token and price feed
collateralToken = new MockERC20("Mock Collateral", "MCT", 18);
collateralTokenPriceFeed = new MockChainLinkFeed();

// Deploy UbiquityAMOMinter contract
amoMinter = new UbiquityAMOMinter(
owner, // Owner address
owner,
address(collateralToken), // Collateral token address
0, // Collateral index
address(ubiquityPoolFacet) // Pool address
Expand All @@ -39,21 +40,23 @@ contract UbiquityAMOMinterTest is DiamondTestSetup {
vm.prank(owner);
amoMinter.enableAMO(address(aaveAMO));

vm.startPrank(admin);
vm.startPrank(admin); // Prank as admin for pool setup

// add collateral token to the pool
uint256 poolCeiling = 500_000e18; // max 500_000 of collateral tokens is allowed
// Add collateral token to the pool with a ceiling
uint256 poolCeiling = 500_000e18;
ubiquityPoolFacet.addCollateralToken(
address(collateralToken),
address(collateralTokenPriceFeed),
poolCeiling
);

// Enable collateral and register AMO Minter
ubiquityPoolFacet.toggleCollateral(0);

ubiquityPoolFacet.addAmoMinter(address(amoMinter));

// Mint collateral to the pool
collateralToken.mint(address(ubiquityPoolFacet), 500_000e18);

vm.stopPrank();
}

Expand Down

0 comments on commit e03c3eb

Please sign in to comment.