Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix imports and silence linter warnings for script files #118

Merged
merged 3 commits into from
Jan 22, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
remove unnecessary lines from test files
jackchuma committed Jan 22, 2025
commit a5c1a1ea1867638bde63a3e1b33f38e84d525633
4 changes: 1 addition & 3 deletions script/deploy/l2/tests/TestWithdraw.s.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.15;

// solhint-disable-next-line no-console
// solhint-disable no-console
import {console} from "forge-std/console.sol";
import {Script} from "forge-std/Script.sol";

@@ -14,11 +14,9 @@ contract TestWithdraw is Script {
function run(address _tester, address _l2erc20, address _l1erc721, address _l2erc721) public {
vm.startBroadcast(_tester);
L2StandardBridge(payable(Predeploys.L2_STANDARD_BRIDGE)).withdraw(_l2erc20, 10_000 ether, 200_000, bytes(""));
// solhint-disable-next-line no-console
console.log("erc20 withdrawal initiated");

L2ERC721Bridge(payable(Predeploys.L2_ERC721_BRIDGE)).bridgeERC721(_l2erc721, _l1erc721, 0, 200_000, bytes(""));
// solhint-disable-next-line no-console
console.log("erc721 withdrawal initiated");

vm.stopBroadcast();
6 changes: 2 additions & 4 deletions script/universal/Signatures.sol
Original file line number Diff line number Diff line change
@@ -73,8 +73,7 @@ library Signatures {
* @dev see https://github.com/safe-global/safe-smart-account/blob/1ed486bb148fe40c26be58d1b517cec163980027/contracts/Safe.sol#L265-L334
* @param _safe Address of the Safe that should verify the signatures.
* @param _signatures Signature data that should be verified.
* Can be packed ECDSA signature ({bytes32 r}{bytes32 s}{uint8 v}),
* contract signature (EIP-1271) or approved hash.
* Can be packed ECDSA signature ({bytes32 r}{bytes32 s}{uint8 v}), contract signature (EIP-1271) or approved hash.
* Can be suffixed with EIP-1271 signatures after threshold*65 bytes.
* @param dataHash Hash that is signed.
* @param threshold Number of signatures required to approve the transaction.
@@ -108,8 +107,7 @@ library Signatures {
if (k < j) continue;

uniqueAddresses[j] = owner;
// address in first 160 bits, index in second 96 bits
addressesAndIndexes[j] = uint256(uint256(uint160(owner)) << 0x60 | i);
addressesAndIndexes[j] = uint256(uint256(uint160(owner)) << 0x60 | i); // address in first 160 bits, index in second 96 bits
j++;

// we have enough signatures to reach the threshold
5 changes: 1 addition & 4 deletions test/universal/DoubleNestedMultisigBuilder.t.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.15;

// solhint-disable-next-line no-console
import {console} from "forge-std/console.sol";
import {IMulticall3} from "forge-std/interfaces/IMulticall3.sol";
import {Test} from "forge-std/Test.sol";
import {Vm} from "forge-std/Vm.sol";
@@ -25,10 +23,9 @@ contract DoubleNestedMultisigBuilderTest is Test, DoubleNestedMultisigBuilder {
Counter internal counter = new Counter(address(safe4));

bytes internal dataToSign1 =
// solhint-disable-next-line max-line-length
// solhint-disable max-line-length
hex"1901d4bb33110137810c444c1d9617abe97df097d587ecde64e6fcb38d7f49e1280c32a807b9689901dd0dbb7352e9e6c5265e3f6a68667de4be988f03f6a88511f7";
bytes internal dataToSign2 =
// solhint-disable-next-line max-line-length
hex"190132640243d7aade8c72f3d90d2dbf359e9897feba5fce1453bc8d9e7ba10d171532a807b9689901dd0dbb7352e9e6c5265e3f6a68667de4be988f03f6a88511f7";

function setUp() public {
2 changes: 0 additions & 2 deletions test/universal/MultisigBuilder.t.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.15;

// solhint-disable-next-line no-console
import {console} from "forge-std/console.sol";
import {IMulticall3} from "forge-std/interfaces/IMulticall3.sol";
import {Test} from "forge-std/Test.sol";
import {Vm} from "forge-std/Vm.sol";
5 changes: 1 addition & 4 deletions test/universal/NestedMultisigBuilder.t.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.15;

// solhint-disable-next-line no-console
import {console} from "forge-std/console.sol";
import {IMulticall3} from "forge-std/interfaces/IMulticall3.sol";
import {Test} from "forge-std/Test.sol";
import {Vm} from "forge-std/Vm.sol";
@@ -24,10 +22,9 @@ contract NestedMultisigBuilderTest is Test, NestedMultisigBuilder {
Counter internal counter = new Counter(address(safe3));

bytes internal dataToSign1 =
// solhint-disable-next-line max-line-length
// solhint-disable max-line-length
hex"1901d4bb33110137810c444c1d9617abe97df097d587ecde64e6fcb38d7f49e1280c3afd48ea8b0056e1028951ba44695d612396f4a1c3851f4b8a262c53ee1f2503";
bytes internal dataToSign2 =
// solhint-disable-next-line max-line-length
hex"190132640243d7aade8c72f3d90d2dbf359e9897feba5fce1453bc8d9e7ba10d17153afd48ea8b0056e1028951ba44695d612396f4a1c3851f4b8a262c53ee1f2503";

function setUp() public {