From 126ec8c7ca2169b5af485127c5ebf2256cccfc16 Mon Sep 17 00:00:00 2001 From: Emmanuella <113827536+ATella12@users.noreply.github.com> Date: Thu, 24 Oct 2024 20:29:09 +0100 Subject: [PATCH] Change function visibility of run() from public to external Updated the visibility of the run() function in the TestWithdraw contract from public to external. This change improves gas efficiency by restricting the function to external calls only, as it is intended to be invoked by external contracts or accounts. No other functionality or logic in the contract has been altered. --- script/deploy/l2/tests/TestWithdraw.s.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/deploy/l2/tests/TestWithdraw.s.sol b/script/deploy/l2/tests/TestWithdraw.s.sol index 78591ed..c6ac5bb 100644 --- a/script/deploy/l2/tests/TestWithdraw.s.sol +++ b/script/deploy/l2/tests/TestWithdraw.s.sol @@ -10,7 +10,7 @@ import {L2ERC721Bridge} from "@eth-optimism-bedrock/src/L2/L2ERC721Bridge.sol"; // Withdraws tokens from L2 to L1 to test Base Mainnet's bridging functionality contract TestWithdraw is Script { - function run(address _tester, address _l2erc20, address _l1erc721, address _l2erc721) public { + function run(address _tester, address _l2erc20, address _l1erc721, address _l2erc721) external { vm.startBroadcast(_tester); L2StandardBridge(payable(Predeploys.L2_STANDARD_BRIDGE)).withdraw(_l2erc20, 10_000 ether, 200_000, bytes("")); console.log("erc20 withdrawal initiated");