Skip to content

Commit

Permalink
fix: resolve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dristpunk committed Feb 23, 2024
1 parent b29a687 commit 46c064d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ concurrency:

env:
MAINNET_RPC: ${{ secrets.MAINNET_RPC }}
DEPLOYER_PRIVATE_KEY: '0x115241e9f8d2246550d50641f38ee4170b937f25dfb983f7e34960f9670fc41d'
DEPLOYER_PRIVATE_KEY: ${{ secrets.DEPLOYER_PRIVATE_KEY }}

jobs:
integration-tests:
Expand Down
18 changes: 8 additions & 10 deletions solidity/test/integration/ConnextVestingWallet.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,13 @@ contract UnitConnextVestingWallet is Test, Constants {

assertEq(_connextVestingWallet.vestedAmount(_firstMilestoneTimestamp), 1 ether);

assertApproxEqAbs(_connextVestingWallet.vestedAmount(_firstMilestoneTimestamp + MONTH), 2 ether, MAX_DELTA);
assertEq(_connextVestingWallet.vestedAmount(_firstMilestoneTimestamp + MONTH), 2 ether);

assertApproxEqAbs(_connextVestingWallet.vestedAmount(_firstMilestoneTimestamp + MONTH * 2), 3 ether, MAX_DELTA);
assertEq(_connextVestingWallet.vestedAmount(_firstMilestoneTimestamp + MONTH * 2), 3 ether);

assertApproxEqAbs(_connextVestingWallet.vestedAmount(_firstMilestoneTimestamp + YEAR), 13 ether, MAX_DELTA);
assertEq(_connextVestingWallet.vestedAmount(_firstMilestoneTimestamp + YEAR), 13 ether);

assertApproxEqAbs(
_connextVestingWallet.vestedAmount(_firstMilestoneTimestamp + YEAR + 10 days), 13 ether, MAX_DELTA
);
assertEq(_connextVestingWallet.vestedAmount(_firstMilestoneTimestamp + YEAR + 10 days), 13 ether);
}

/**
Expand All @@ -102,20 +100,20 @@ contract UnitConnextVestingWallet is Test, Constants {
assertEq(_connextVestingWallet.releasable(), 1 ether);

vm.warp(_firstMilestoneTimestamp + MONTH);
assertApproxEqAbs(_connextVestingWallet.releasable(), 2 ether, MAX_DELTA);
assertEq(_connextVestingWallet.releasable(), 2 ether);

_connextVestingWallet.release();
assertEq(_connextVestingWallet.releasable(), 0 ether);

// 2 ether have been withdrawn
vm.warp(_firstMilestoneTimestamp + MONTH * 2);
assertApproxEqAbs(_connextVestingWallet.releasable(), 3 ether - 2 ether, MAX_DELTA);
assertEq(_connextVestingWallet.releasable(), 3 ether - 2 ether);

vm.warp(_firstMilestoneTimestamp + YEAR);
assertApproxEqAbs(_connextVestingWallet.releasable(), 13 ether - 2 ether, MAX_DELTA);
assertEq(_connextVestingWallet.releasable(), 13 ether - 2 ether);

vm.warp(_firstMilestoneTimestamp + YEAR + 10 days);
assertApproxEqAbs(_connextVestingWallet.releasable(), 13 ether - 2 ether, MAX_DELTA);
assertEq(_connextVestingWallet.releasable(), 13 ether - 2 ether);
}

/**
Expand Down

0 comments on commit 46c064d

Please sign in to comment.