Skip to content

Commit

Permalink
cleanup unused vars
Browse files Browse the repository at this point in the history
  • Loading branch information
simplemachine92 committed Apr 2, 2024
1 parent 0a2fac9 commit 63e6b80
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 121 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -265,16 +265,6 @@ contract TestSendReservedTokensToSplitsOf_Local is JBControllerSetup {
bytes memory _tokensMintCall = abi.encodeCall(IJBTokens.mintFor, (_beneficiary, _projectId, _tokenCount));
mockExpect(address(tokens), _tokensMintCall, "");

// split hook data
JBSplitHookContext memory _context = JBSplitHookContext({
token: address(_token),
amount: _tokenCount,
decimals: _decimals,
projectId: 0,
groupId: 1,
split: _splits[0]
});

vm.expectEmit();
emit IJBController.SendReservedTokensToSplit(
_projectId, block.timestamp, 1, _splits[0], _tokenCount, address(this)
Expand Down
111 changes: 0 additions & 111 deletions test/units/static/JBMultiTerminal/TestExecutePayout.sol
Original file line number Diff line number Diff line change
Expand Up @@ -172,16 +172,6 @@ contract TestExecutePayout_Local is JBMultiTerminalSetup {

uint256 taxedAmount = JBFees.feeAmountIn(_defaultAmount, _fee);

// Create the context to send to the split hook.
JBSplitHookContext memory context = JBSplitHookContext({
token: _usdc,
amount: _defaultAmount - taxedAmount, // It will call with taxed amount
decimals: 0,
projectId: _noProject,
groupId: uint256(uint160(_usdc)),
split: _splitMemory
});

// mock call to usdc transfer
mockExpect(
address(_usdc),
Expand Down Expand Up @@ -220,18 +210,6 @@ contract TestExecutePayout_Local is JBMultiTerminalSetup {
hook: IJBSplitHook(address(0))
});

uint256 taxedAmount = JBFees.feeAmountIn(_defaultAmount, _fee);

// Create the context to send to the split hook.
JBSplitHookContext memory context = JBSplitHookContext({
token: _native,
amount: _defaultAmount - taxedAmount, // It will call with taxed amount
decimals: 0,
projectId: _projectId,
groupId: uint256(uint160(_native)),
split: _splitMemory
});

vm.expectRevert(bytes("404_2"));
vm.prank(address(_terminal));
_terminal.executePayout({
Expand Down Expand Up @@ -262,19 +240,6 @@ contract TestExecutePayout_Local is JBMultiTerminalSetup {
hook: IJBSplitHook(address(0))
});

uint256 taxedAmount = JBFees.feeAmountIn(_defaultAmount, _fee);
uint256 amountAfterTax = _defaultAmount - taxedAmount;

// Create the context to send to the split hook.
JBSplitHookContext memory context = JBSplitHookContext({
token: _usdc,
amount: amountAfterTax, // It will call with taxed amount
decimals: 0,
projectId: _projectId,
groupId: uint256(uint160(_usdc)),
split: _splitMemory
});

// mock call to JBTerminalStore recordAddedBalanceFor
mockExpect(
address(store),
Expand Down Expand Up @@ -323,16 +288,6 @@ contract TestExecutePayout_Local is JBMultiTerminalSetup {
uint256 taxedAmount = JBFees.feeAmountIn(_defaultAmount, _fee);
uint256 amountAfterTax = _defaultAmount - taxedAmount;

// Create the context to send to the split hook.
JBSplitHookContext memory context = JBSplitHookContext({
token: _usdc,
amount: amountAfterTax, // It will call with taxed amount
decimals: 0,
projectId: _projectId,
groupId: uint256(uint160(_usdc)),
split: _splitMemory
});

// mock call for SafeERC20s allowance check
mockExpect(
_usdc, abi.encodeCall(IERC20.allowance, (address(_terminal), address(_mockSecondTerminal))), abi.encode(0)
Expand Down Expand Up @@ -380,19 +335,6 @@ contract TestExecutePayout_Local is JBMultiTerminalSetup {
hook: IJBSplitHook(address(0))
});

uint256 taxedAmount = JBFees.feeAmountIn(_defaultAmount, _fee);
uint256 amountAfterTax = _defaultAmount - taxedAmount;

// Create the context to send to the split hook.
JBSplitHookContext memory context = JBSplitHookContext({
token: _usdc,
amount: amountAfterTax, // It will call with taxed amount
decimals: 0,
projectId: _projectId,
groupId: uint256(uint160(_usdc)),
split: _splitMemory
});

// needed for next mock call returns
JBTokenAmount memory tokenAmount = JBTokenAmount(_usdc, _defaultAmount, 0, 0);
JBPayHookSpecification[] memory hookSpecifications = new JBPayHookSpecification[](0);
Expand Down Expand Up @@ -459,16 +401,6 @@ contract TestExecutePayout_Local is JBMultiTerminalSetup {
uint256 taxedAmount = JBFees.feeAmountIn(_defaultAmount, _fee);
uint256 amountAfterTax = _defaultAmount - taxedAmount;

// Create the context to send to the split hook.
JBSplitHookContext memory context = JBSplitHookContext({
token: _usdc,
amount: amountAfterTax, // It will call with taxed amount
decimals: 0,
projectId: _projectId,
groupId: uint256(uint160(_usdc)),
split: _splitMemory
});

// mock call for SafeERC20s allowance check
mockExpect(
_usdc, abi.encodeCall(IERC20.allowance, (address(_terminal), address(_mockSecondTerminal))), abi.encode(0)
Expand Down Expand Up @@ -514,16 +446,6 @@ contract TestExecutePayout_Local is JBMultiTerminalSetup {
hook: IJBSplitHook(address(0))
});

// Create the context to send to the split hook.
JBSplitHookContext memory context = JBSplitHookContext({
token: _usdc,
amount: _defaultAmount,
decimals: 0,
projectId: _noProject,
groupId: uint256(uint160(_usdc)),
split: _splitMemory
});

// mock call to usdc transfer
mockExpect(address(_usdc), abi.encodeCall(IERC20.transfer, (address(_bene), _defaultAmount)), abi.encode(true));

Expand Down Expand Up @@ -561,16 +483,6 @@ contract TestExecutePayout_Local is JBMultiTerminalSetup {
uint256 taxedAmount = JBFees.feeAmountIn(_defaultAmount, _fee);
uint256 amountAfterTax = _defaultAmount - taxedAmount;

// Create the context to send to the split hook.
JBSplitHookContext memory context = JBSplitHookContext({
token: _usdc,
amount: amountAfterTax,
decimals: 0,
projectId: _noProject,
groupId: uint256(uint160(_usdc)),
split: _splitMemory
});

// mock call to usdc transfer
mockExpect(address(_usdc), abi.encodeCall(IERC20.transfer, (address(_bene), amountAfterTax)), abi.encode(true));

Expand Down Expand Up @@ -606,16 +518,6 @@ contract TestExecutePayout_Local is JBMultiTerminalSetup {
uint256 taxedAmount = JBFees.feeAmountIn(_defaultAmount, _fee);
uint256 amountAfterTax = _defaultAmount - taxedAmount;

// Create the context to send to the split hook.
JBSplitHookContext memory context = JBSplitHookContext({
token: _usdc,
amount: amountAfterTax,
decimals: 0,
projectId: _noProject,
groupId: uint256(uint160(_usdc)),
split: _splitMemory
});

// mock call to usdc transfer
mockExpect(address(_usdc), abi.encodeCall(IERC20.transfer, (address(this), amountAfterTax)), abi.encode(true));

Expand Down Expand Up @@ -643,19 +545,6 @@ contract TestExecutePayout_Local is JBMultiTerminalSetup {
hook: IJBSplitHook(address(0))
});

uint256 taxedAmount = JBFees.feeAmountIn(_defaultAmount, _fee);
uint256 amountAfterTax = _defaultAmount - taxedAmount;

// Create the context to send to the split hook.
JBSplitHookContext memory context = JBSplitHookContext({
token: _usdc,
amount: amountAfterTax,
decimals: 0,
projectId: _noProject,
groupId: uint256(uint160(_usdc)),
split: _splitMemory
});

vm.expectRevert();
_terminal.executePayout({
split: _splitMemory,
Expand Down

0 comments on commit 63e6b80

Please sign in to comment.