diff --git a/contracts/gateway/L1GraphTokenGateway.sol b/contracts/gateway/L1GraphTokenGateway.sol index ac5b1c6bc..c8fb4baa1 100644 --- a/contracts/gateway/L1GraphTokenGateway.sol +++ b/contracts/gateway/L1GraphTokenGateway.sol @@ -149,6 +149,7 @@ contract L1GraphTokenGateway is GraphTokenGateway, L1ArbitrumMessenger { */ function addToCallhookWhitelist(address _newWhitelisted) external onlyGovernor { require(_newWhitelisted != address(0), "INVALID_ADDRESS"); + require(!callhookWhitelist[_newWhitelisted], "ALREADY_WHITELISTED"); callhookWhitelist[_newWhitelisted] = true; emit AddedToCallhookWhitelist(_newWhitelisted); } @@ -160,6 +161,7 @@ contract L1GraphTokenGateway is GraphTokenGateway, L1ArbitrumMessenger { */ function removeFromCallhookWhitelist(address _notWhitelisted) external onlyGovernor { require(_notWhitelisted != address(0), "INVALID_ADDRESS"); + require(callhookWhitelist[_notWhitelisted], "NOT_WHITELISTED"); callhookWhitelist[_notWhitelisted] = false; emit RemovedFromCallhookWhitelist(_notWhitelisted); } diff --git a/test/lib/fixtures.ts b/test/lib/fixtures.ts index 54dc8bf3f..5a4f1e53a 100644 --- a/test/lib/fixtures.ts +++ b/test/lib/fixtures.ts @@ -283,9 +283,6 @@ export class NetworkFixture { await l1FixtureContracts.l1Reservoir .connect(deployer) .setL2ReservoirAddress(mockL2ReservoirAddress) - await l1FixtureContracts.l1GraphTokenGateway - .connect(deployer) - .addToCallhookWhitelist(l1FixtureContracts.l1Reservoir.address) await l1FixtureContracts.l1GraphTokenGateway.connect(deployer).setPaused(false) }