Skip to content

Commit

Permalink
fix: review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-manuel committed Jul 22, 2024
1 parent d7d981f commit 719140e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
ARBITRUM_NOVA_RPC_URL: ${{secrets.ARBITRUM_NOVA_RPC_URL}}
GNOSIS_CHAIN_RPC_URL: ${{secrets.GNOSIS_CHAIN_RPC_URL}}
BASE_RPC_URL: ${{secrets.BASE_RPC_URL}}
TENDERLY_STAGING_URL: ${{secrets.TENDERLY_STAGING_URL}}
run: FOUNDRY_PROFILE=ci forge test

coverage:
Expand All @@ -58,6 +59,7 @@ jobs:
ARBITRUM_NOVA_RPC_URL: ${{secrets.ARBITRUM_NOVA_RPC_URL}}
GNOSIS_CHAIN_RPC_URL: ${{secrets.GNOSIS_CHAIN_RPC_URL}}
BASE_RPC_URL: ${{secrets.BASE_RPC_URL}}
TENDERLY_STAGING_URL: ${{secrets.TENDERLY_STAGING_URL}}
run: forge coverage --report summary --report lcov

# To ignore coverage for certain directories modify the paths in this step as needed. The
Expand Down
8 changes: 4 additions & 4 deletions test/fork/MigrationActions.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { MigrationActions } from "src/MigrationActions.sol";

interface PotLike {
function drip() external returns (uint256);
function pie(address) external view returns(uint256);
}

interface VatLike {
Expand All @@ -19,6 +18,7 @@ interface VatLike {

interface SavingsTokenLike is IERC20 {
function convertToAssets(uint256 shares) external view returns(uint256 assets);
function convertToShares(uint256 assets) external view returns(uint256 shares);
function deposit(uint256 assets, address receiver) external returns (uint256 shares);
function drip() external;
function totalAssets() external view returns(uint256);
Expand Down Expand Up @@ -55,7 +55,7 @@ contract MigrationActionsIntegrationTestBase is Test {

function setUp() public virtual {
vm.createSelectFork(
"https://virtual.mainnet.rpc.tenderly.co/cc1fdd8b-c3a7-4092-8dc4-b07fbac3a5ba",
vm.envString("TENDERLY_STAGING_URL"),
19871405 // July 18, 2024
);

Expand Down Expand Up @@ -214,7 +214,7 @@ contract MigrateSDaiAssetsToNstIntegrationTest is MigrationActionsIntegrationTes
uint256 daiDripAmount = vat.dai(POT) - preDripPotDai;
vm.revertTo(snapshot);

sdai.approve(address(actions), amount);
sdai.approve(address(actions), sdai.convertToShares(amount) + 1); // Approve corresponding shares

// Cache all starting state
uint256 userAssets = sdai.convertToAssets(sdai.balanceOf(user));
Expand Down Expand Up @@ -280,7 +280,7 @@ contract MigrateSDaiSharesToNstIntegrationTest is MigrationActionsIntegrationTes

uint256 userAssets = sdai.convertToAssets(sdai.balanceOf(user));

sdai.approve(address(actions), userAssets);
sdai.approve(address(actions), sdai.balanceOf(user));

// Cache all starting state
uint256 debt = vat.debt();
Expand Down

0 comments on commit 719140e

Please sign in to comment.