Skip to content

Commit

Permalink
Fix scopelint issue remove no-deal test
Browse files Browse the repository at this point in the history
  • Loading branch information
jferas committed Dec 7, 2023
1 parent 0c5372f commit a682729
Showing 1 changed file with 2 additions and 36 deletions.
38 changes: 2 additions & 36 deletions test/RadworksGovernor.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ abstract contract Propose is ProposalTest {
// Craft a new proposal to send the token.
address[] memory _targets = new address[](1);
uint256[] memory _values = new uint256[](1);
string[] memory _signatures = new string [](1);
string[] memory _signatures = new string[](1);
bytes[] memory _calldatas = new bytes[](1);

_targets[0] = address(_token);
Expand Down Expand Up @@ -318,40 +318,6 @@ abstract contract Propose is ProposalTest {
assertEq(TIMELOCK.balance, _timelockETHBalance - _amount);
}

// @dev The timelock has no ETH as of 2023-11-08
// see here: https://etherscan.io/address/0x8dA8f82d2BbDd896822de723F55D6EdF416130ba
function testFuzz_NewGovernorCanPassProposalToSendETHWithNoDeal(
uint256 _amount,
address _receiver
) public {
// Deal 30 ETH to the Timelock so it has ETH to send.
vm.deal(TIMELOCK, 30 ether);
_assumeReceiver(_receiver);
_amount = bound(_amount, 0, 30 ether);
uint256 _timelockETHBalance = TIMELOCK.balance;
uint256 _receiverETHBalance = _receiver.balance;

_upgradeToBravoGovernor();

// Craft a new proposal to send ETH.
address[] memory _targets = new address[](1);
uint256[] memory _values = new uint256[](1);
_targets[0] = _receiver;
_values[0] = _amount;

_queueAndVoteAndExecuteProposalWithBravoGovernor(
_targets,
_values,
new bytes[](1), // There is no calldata for a plain ETH call.
"Transfer some ETH via the new Governor",
FOR // Vote/suppport type.
);

// Ensure the ETH was transferred.
assertEq(_receiver.balance, _receiverETHBalance + _amount);
assertEq(TIMELOCK.balance, _timelockETHBalance - _amount);
}

function testFuzz_NewGovernorCanPassProposalToSendETHWithTokens(
uint256 _amountETH,
uint256 _amountToken,
Expand Down Expand Up @@ -655,7 +621,7 @@ abstract contract Propose is ProposalTest {
// Create a new proposal to send the token.
_vars.alphaTargets = new address[](1);
_vars.alphaValues = new uint256[](1);
_vars.alphaSignatures = new string [](1);
_vars.alphaSignatures = new string[](1);
_vars.alphaCalldatas = new bytes[](1);
_vars.alphaDescription = "Transfer some tokens from the new Governor";

Expand Down

0 comments on commit a682729

Please sign in to comment.