Skip to content

Commit

Permalink
test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kelemeno committed Sep 10, 2024
1 parent 8155711 commit c0d45fa
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 40 deletions.
1 change: 0 additions & 1 deletion l1-contracts/contracts/bridge/BridgeHelper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ pragma solidity 0.8.24;
import {IERC20Metadata} from "@openzeppelin/contracts-v4/token/ERC20/extensions/IERC20Metadata.sol";
import {ETH_TOKEN_ADDRESS} from "../common/Config.sol";
import {DataEncoding} from "../common/libraries/DataEncoding.sol";
import {NEW_ENCODING_VERSION} from "./asset-router/IAssetRouterBase.sol";

/**
* @author Matter Labs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -456,26 +456,17 @@ contract ExperimentalBridgeTest is Test {
address randomCaller,
uint256 randomValue
) public useRandomToken(randomValue) {
<<<<<<< HEAD:l1-contracts/test/foundry/l1/unit/concrete/Bridgehub/experimental_bridge.t.sol
vm.startPrank(bridgeOwner);
bridgeHub.setAddresses(address(mockSharedBridge), ICTMDeploymentTracker(address(0)), IMessageRoot(address(0)));
vm.stopPrank();

bytes32 assetId = DataEncoding.encodeNTVAssetId(block.chainid, testTokenAddress);

if (randomCaller != bridgeOwner) {
vm.prank(randomCaller);
vm.expectRevert(bytes("Ownable: caller is not the owner"));
bridgeHub.addTokenAssetId(assetId);
}
=======
vm.assume(randomCaller != bridgeOwner);
vm.assume(randomCaller != bridgeHub.admin());

vm.prank(randomCaller);
vm.expectRevert(abi.encodeWithSelector(Unauthorized.selector, randomCaller));
bridgeHub.addToken(randomAddress);
>>>>>>> b653ac8044f78956d81625dd7ee409d7c9651685:l1-contracts/test/foundry/unit/concrete/Bridgehub/experimental_bridge.t.sol
bridgeHub.addTokenAssetId(assetId);

assertTrue(!bridgeHub.assetIdIsRegistered(assetId), "This random address is not registered as a token");

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,6 @@ contract L1AssetRouterTest is Test {
nativeTokenVault.registerToken(address(token));
nativeTokenVault.registerEthToken();
vm.prank(owner);
sharedBridge.setPendingAdmin(admin);
vm.prank(admin);
sharedBridge.acceptAdmin();

vm.store(
address(sharedBridge),
Expand Down

0 comments on commit c0d45fa

Please sign in to comment.