diff --git a/smart-contracts/contracts/periphery/TokenManagerV4/LockProxyTokenManagerUpgradeableV4.sol b/smart-contracts/contracts/periphery/TokenManagerV4/LockProxyTokenManagerUpgradeableV4.sol index a41b515..0c92669 100644 --- a/smart-contracts/contracts/periphery/TokenManagerV4/LockProxyTokenManagerUpgradeableV4.sol +++ b/smart-contracts/contracts/periphery/TokenManagerV4/LockProxyTokenManagerUpgradeableV4.sol @@ -21,10 +21,6 @@ contract LockProxyTokenManagerUpgradeableV4 is TokenManagerUpgradeableV4, ILockP _disableInitializers(); } - function reinitialize(uint fees) external reinitializer(2) { - _setFees(fees); - } - // Incoming currency - transfer into the lock proxy (directly!) function _handleTransfer(address token, address from, uint amount) internal override { address lockProxyAddress = getLockProxy(); diff --git a/smart-contracts/contracts/periphery/TokenManagerV4/TokenManagerUpgradeableV4.sol b/smart-contracts/contracts/periphery/TokenManagerV4/TokenManagerUpgradeableV4.sol index 600f357..1f852c1 100644 --- a/smart-contracts/contracts/periphery/TokenManagerV4/TokenManagerUpgradeableV4.sol +++ b/smart-contracts/contracts/periphery/TokenManagerV4/TokenManagerUpgradeableV4.sol @@ -89,13 +89,19 @@ abstract contract TokenManagerUpgradeableV4 is address gateway; // localTokenAddress => remoteChainId => RemoteToken mapping(address => mapping(uint => RemoteToken)) remoteTokens; + // This stores the scale for remote tokens, as remote_token.decimals-local_token.decimals. + // So, when sending a token with a +ve scale, we shift left. + // When sending a token with a -ve scale, we shift right. + // When receiving a token, we do nothing. + // This allows us to validate that the tokens can be exactly converted to the remote + // and revert the sending txn if not. + mapping(address => mapping(uint => int8)) scaleForRemoteTokens; } // keccak256(abi.encode(uint256(keccak256("zilliqa.storage.TokenManager")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant Token_Manager_Storage_Location = 0x4a6c2e6a7e6518c249bdcd1d934ea16ea5325bbae105af814eb678f5f49f3400; - function _getTokenManagerStorage() private pure @@ -106,27 +112,6 @@ abstract contract TokenManagerUpgradeableV4 is } } - struct TokenManagerV4Storage { - // This stores the scale for remote tokens, as remote_token.decimals-local_token.decimals. - // So, when sending a token with a +ve scale, we shift left. - // When sending a token with a -ve scale, we shift right. - // When receiving a token, we do nothing. - // This allows us to validate that the tokens can be exactly converted to the remote - // and revert the sending txn if not. - mapping(address => mapping(uint => int8)) scaleForRemoteTokens; - } - - // keccack256(abi.encode(uint256(keccak256("zilliqa.storage.TokenManagerV4"))-1))& ~bytes32(uint256(0xff)) - bytes32 private constant Token_ManagerV4_Storage_Location = - 0xe8b1c929e9ac4c16aaeb9d6494126adb9c7e3b297332aeb86accee6d41c67500; - - function _getTokenManagerV4Storage() - private pure returns (TokenManagerV4Storage storage $) - { - assembly { - $.slot := Token_ManagerV4_Storage_Location - } - } function getGateway() public view returns (address) { TokenManagerStorage storage $ = _getTokenManagerStorage(); @@ -142,7 +127,7 @@ abstract contract TokenManagerUpgradeableV4 is } function getRemoteTokenScale(address token, uint remoteChainId) public view returns (int8) { - TokenManagerV4Storage storage $ = _getTokenManagerV4Storage(); + TokenManagerStorage storage $ = _getTokenManagerStorage(); return $.scaleForRemoteTokens[token][remoteChainId]; } @@ -172,8 +157,7 @@ abstract contract TokenManagerUpgradeableV4 is function _removeToken(address localToken, uint remoteChainId) internal { TokenManagerStorage storage $ = _getTokenManagerStorage(); delete $.remoteTokens[localToken][remoteChainId]; - TokenManagerV4Storage storage $$ = _getTokenManagerV4Storage(); - delete $$.scaleForRemoteTokens[localToken][remoteChainId]; + delete $.scaleForRemoteTokens[localToken][remoteChainId]; emit TokenRemoved(localToken, remoteChainId); } @@ -194,7 +178,7 @@ abstract contract TokenManagerUpgradeableV4 is function _setScaleForToken(address localToken, uint remoteChainId, int8 scale) internal { - TokenManagerV4Storage storage $ = _getTokenManagerV4Storage(); + TokenManagerStorage storage $ = _getTokenManagerStorage(); $.scaleForRemoteTokens[localToken][remoteChainId] = scale; emit TokenScaleChanged( localToken, remoteChainId, @@ -203,8 +187,8 @@ abstract contract TokenManagerUpgradeableV4 is function _getScaleForToken(address localToken, - uint remoteChainId) internal returns (int8) { - TokenManagerV4Storage storage $ = _getTokenManagerV4Storage(); + uint remoteChainId) internal view returns (int8) { + TokenManagerStorage storage $ = _getTokenManagerStorage(); return $.scaleForRemoteTokens[localToken][remoteChainId]; } diff --git a/smart-contracts/script/bsc-testnet/deployZilBridgeTokenManagers.s.sol b/smart-contracts/script/bsc-testnet/deployZilBridgeTokenManagers.s.sol index 4bd051f..347d63e 100644 --- a/smart-contracts/script/bsc-testnet/deployZilBridgeTokenManagers.s.sol +++ b/smart-contracts/script/bsc-testnet/deployZilBridgeTokenManagers.s.sol @@ -45,7 +45,7 @@ contract deployZilBridgeTokenManagers is Script, LockProxyTokenManagerDeployer, allowedTokens[1] = bscBridgedZRC2Address; allowedTokens[2] = bscBridgedZILAddress; LockProxyProxy lockProxyProxy = new LockProxyProxy(allowedTokens, vm.addr(validatorPrivateKey), address(lockProxy)); - LockProxyTokenManagerUpgradeableV3 tokenManager = deployLatestLockProxyTokenManager(address(chainGateway), address(lockProxy), address(lockProxyProxy), fees); + LockProxyTokenManagerUpgradeableV3 tokenManager = deployLockProxyTokenManagerV3(address(chainGateway), address(lockProxy), address(lockProxyProxy), fees); lockProxyProxy.addCaller(address(tokenManager)); console.log( " address public constant bscLockProxyTokenManagerAddress = %s", address(tokenManager)); diff --git a/smart-contracts/script/zq-testnet/deployNativeTokenManagerV3.s.sol b/smart-contracts/script/zq-testnet/deployNativeTokenManagerV3.s.sol index 24c4577..0893ef3 100644 --- a/smart-contracts/script/zq-testnet/deployNativeTokenManagerV3.s.sol +++ b/smart-contracts/script/zq-testnet/deployNativeTokenManagerV3.s.sol @@ -17,7 +17,7 @@ contract Deployment is Script, LockAndReleaseOrNativeTokenManagerDeployer,Testne vm.startBroadcast(deployerPrivateKey); LockAndReleaseOrNativeTokenManagerUpgradeableV3 tokenManager = - deployLatestLockAndReleaseOrNativeTokenManager(chainGatewayAddress, fees); + deployLockAndReleaseOrNativeTokenManagerV3(chainGatewayAddress, fees); console.log( "LockAndReleaseOrNativeTokenManager Proxy deployed to %s, with owner %s and gateway %s", address(tokenManager), diff --git a/smart-contracts/test/periphery/TokenBridge.integration.t.sol b/smart-contracts/test/periphery/TokenBridge.integration.t.sol index 898025d..1ca87ee 100644 --- a/smart-contracts/test/periphery/TokenBridge.integration.t.sol +++ b/smart-contracts/test/periphery/TokenBridge.integration.t.sol @@ -3,22 +3,22 @@ pragma solidity 0.8.20; import {Tester, Vm} from "test/Tester.sol"; import {ITokenManagerStructs, TokenManagerUpgradeable} from "contracts/periphery/TokenManagerUpgradeable.sol"; -import {LockAndReleaseTokenManagerUpgradeableV3} from "contracts/periphery/TokenManagerV3/LockAndReleaseTokenManagerUpgradeableV3.sol"; -import {MintAndBurnTokenManagerUpgradeableV3} from "contracts/periphery/TokenManagerV3/MintAndBurnTokenManagerUpgradeableV3.sol"; +import {LockAndReleaseOrNativeTokenManagerUpgradeableV4} from "contracts/periphery/TokenManagerV4/LockAndReleaseOrNativeTokenManagerUpgradeableV4.sol"; +import {MintAndBurnTokenManagerUpgradeableV4} from "contracts/periphery/TokenManagerV4/MintAndBurnTokenManagerUpgradeableV4.sol"; import {BridgedToken} from "contracts/periphery/BridgedToken.sol"; import {CallMetadata, IRelayerEvents} from "contracts/core/Relayer.sol"; import {ValidatorManager} from "contracts/core/ValidatorManager.sol"; import {ChainGateway} from "contracts/core/ChainGateway.sol"; import {MessageHashUtils} from "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol"; import {TestToken} from "test/Helpers.sol"; -import {LockAndReleaseTokenManagerDeployer} from "test/periphery/TokenManagerDeployers/LockAndReleaseTokenManagerDeployer.sol"; +import {LockAndReleaseOrNativeTokenManagerDeployer} from "test/periphery/TokenManagerDeployers/LockAndReleaseOrNativeTokenManagerDeployer.sol"; import {MintAndBurnTokenManagerDeployer} from "test/periphery/TokenManagerDeployers/MintAndBurnTokenManagerDeployer.sol"; // Integration Tests combining the TokenManagers and ChainGateway contract TokenBridgeIntegrationTests is Tester, IRelayerEvents, - LockAndReleaseTokenManagerDeployer, + LockAndReleaseOrNativeTokenManagerDeployer, MintAndBurnTokenManagerDeployer { using MessageHashUtils for bytes; @@ -32,12 +32,12 @@ contract TokenBridgeIntegrationTests is uint originalTokenSupply = 1000 ether; uint fees = 0.1 ether; - LockAndReleaseTokenManagerUpgradeableV3 sourceTokenManager; + LockAndReleaseOrNativeTokenManagerUpgradeableV4 sourceTokenManager; TestToken originalToken; ChainGateway sourceChainGateway; ValidatorManager sourceValidatorManager; - MintAndBurnTokenManagerUpgradeableV3 remoteTokenManager; + MintAndBurnTokenManagerUpgradeableV4 remoteTokenManager; BridgedToken bridgedToken; ChainGateway remoteChainGateway; ValidatorManager remoteValidatorManager; @@ -61,7 +61,7 @@ contract TokenBridgeIntegrationTests is ); // Deploy LockAndReleaseTokenManagerUpgradeable - sourceTokenManager = deployLatestLockAndReleaseTokenManager( + sourceTokenManager = deployLatestLockAndReleaseOrNativeTokenManager( address(sourceChainGateway), fees ); diff --git a/smart-contracts/test/periphery/TokenBridge.native.t.sol b/smart-contracts/test/periphery/TokenBridge.native.t.sol index 8f29ca7..2517665 100644 --- a/smart-contracts/test/periphery/TokenBridge.native.t.sol +++ b/smart-contracts/test/periphery/TokenBridge.native.t.sol @@ -4,7 +4,9 @@ pragma solidity 0.8.20; import {Tester, Vm} from "test/Tester.sol"; import {ITokenManagerStructs, TokenManagerUpgradeable} from "contracts/periphery/TokenManagerUpgradeable.sol"; import {LockAndReleaseOrNativeTokenManagerUpgradeableV3} from "contracts/periphery/TokenManagerV3/LockAndReleaseOrNativeTokenManagerUpgradeableV3.sol"; +import {LockAndReleaseOrNativeTokenManagerUpgradeableV4} from "contracts/periphery/TokenManagerV4/LockAndReleaseOrNativeTokenManagerUpgradeableV4.sol"; import {MintAndBurnTokenManagerUpgradeableV3} from "contracts/periphery/TokenManagerV3/MintAndBurnTokenManagerUpgradeableV3.sol"; +import {MintAndBurnTokenManagerUpgradeableV4} from "contracts/periphery/TokenManagerV4/MintAndBurnTokenManagerUpgradeableV4.sol"; import {BridgedToken} from "contracts/periphery/BridgedToken.sol"; import {CallMetadata, IRelayerEvents} from "contracts/core/Relayer.sol"; import {ValidatorManager} from "contracts/core/ValidatorManager.sol"; @@ -32,12 +34,12 @@ contract TokenBridgeNativeTests is uint originalTokenSupply = 1000 ether; uint fees = 0.1 ether; - LockAndReleaseOrNativeTokenManagerUpgradeableV3 sourceTokenManager; + LockAndReleaseOrNativeTokenManagerUpgradeableV4 sourceTokenManager; TestToken originalToken; ChainGateway sourceChainGateway; ValidatorManager sourceValidatorManager; - MintAndBurnTokenManagerUpgradeableV3 remoteTokenManager; + MintAndBurnTokenManagerUpgradeableV4 remoteTokenManager; BridgedToken bridgedToken; ChainGateway remoteChainGateway; ValidatorManager remoteValidatorManager; diff --git a/smart-contracts/test/periphery/TokenManagerDeployers/LockAndReleaseOrNativeTokenManagerDeployer.sol b/smart-contracts/test/periphery/TokenManagerDeployers/LockAndReleaseOrNativeTokenManagerDeployer.sol index 2f7b48b..f03e700 100644 --- a/smart-contracts/test/periphery/TokenManagerDeployers/LockAndReleaseOrNativeTokenManagerDeployer.sol +++ b/smart-contracts/test/periphery/TokenManagerDeployers/LockAndReleaseOrNativeTokenManagerDeployer.sol @@ -5,6 +5,7 @@ import {ERC1967Proxy} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.s import {LockAndReleaseTokenManagerUpgradeable} from "contracts/periphery/LockAndReleaseTokenManagerUpgradeable.sol"; import {LockAndReleaseTokenManagerUpgradeableV2} from "contracts/periphery/TokenManagerV2/LockAndReleaseTokenManagerUpgradeableV2.sol"; import {LockAndReleaseOrNativeTokenManagerUpgradeableV3} from "contracts/periphery/TokenManagerV3/LockAndReleaseOrNativeTokenManagerUpgradeableV3.sol"; +import {LockAndReleaseOrNativeTokenManagerUpgradeableV4} from "contracts/periphery/TokenManagerV4/LockAndReleaseOrNativeTokenManagerUpgradeableV4.sol"; import {LockAndReleaseTokenManagerDeployer} from "./LockAndReleaseTokenManagerDeployer.sol"; abstract contract LockAndReleaseOrNativeTokenManagerDeployer is @@ -27,10 +28,22 @@ abstract contract LockAndReleaseOrNativeTokenManagerDeployer is return LockAndReleaseOrNativeTokenManagerUpgradeableV3(payable(address(proxy))); } + function deployLockAndReleaseOrNativeTokenManagerV4( + address chainGateway, + uint fees + ) public returns (LockAndReleaseOrNativeTokenManagerUpgradeableV4) { + LockAndReleaseOrNativeTokenManagerUpgradeableV3 proxy = deployLockAndReleaseOrNativeTokenManagerV3( + chainGateway, + fees); + address newImplementation = address(new LockAndReleaseOrNativeTokenManagerUpgradeableV4()); + proxy.upgradeToAndCall(newImplementation, ""); + return LockAndReleaseOrNativeTokenManagerUpgradeableV4(payable(address(proxy))); + } + function deployLatestLockAndReleaseOrNativeTokenManager( address chainGateway, uint fees - ) public returns (LockAndReleaseOrNativeTokenManagerUpgradeableV3) { - return deployLockAndReleaseOrNativeTokenManagerV3(chainGateway, fees); + ) public returns (LockAndReleaseOrNativeTokenManagerUpgradeableV4) { + return deployLockAndReleaseOrNativeTokenManagerV4(chainGateway, fees); } } diff --git a/smart-contracts/test/periphery/TokenManagerDeployers/LockAndReleaseTokenManagerDeployer.sol b/smart-contracts/test/periphery/TokenManagerDeployers/LockAndReleaseTokenManagerDeployer.sol index 7d63ad8..79d2033 100644 --- a/smart-contracts/test/periphery/TokenManagerDeployers/LockAndReleaseTokenManagerDeployer.sol +++ b/smart-contracts/test/periphery/TokenManagerDeployers/LockAndReleaseTokenManagerDeployer.sol @@ -66,6 +66,7 @@ abstract contract LockAndReleaseTokenManagerDeployer { return LockAndReleaseTokenManagerUpgradeableV3(address(proxy)); } + function deployLatestLockAndReleaseTokenManager( address chainGateway, uint fees diff --git a/smart-contracts/test/periphery/TokenManagerDeployers/MintAndBurnTokenManagerDeployer.sol b/smart-contracts/test/periphery/TokenManagerDeployers/MintAndBurnTokenManagerDeployer.sol index 2aa05b9..a99df18 100644 --- a/smart-contracts/test/periphery/TokenManagerDeployers/MintAndBurnTokenManagerDeployer.sol +++ b/smart-contracts/test/periphery/TokenManagerDeployers/MintAndBurnTokenManagerDeployer.sol @@ -5,6 +5,7 @@ import {ERC1967Proxy} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.s import {MintAndBurnTokenManagerUpgradeable} from "contracts/periphery/MintAndBurnTokenManagerUpgradeable.sol"; import {MintAndBurnTokenManagerUpgradeableV2} from "contracts/periphery/TokenManagerV2/MintAndBurnTokenManagerUpgradeableV2.sol"; import {MintAndBurnTokenManagerUpgradeableV3} from "contracts/periphery/TokenManagerV3/MintAndBurnTokenManagerUpgradeableV3.sol"; +import {MintAndBurnTokenManagerUpgradeableV4} from "contracts/periphery/TokenManagerV4/MintAndBurnTokenManagerUpgradeableV4.sol"; abstract contract MintAndBurnTokenManagerDeployer { function deployMintAndBurnTokenManagerV1( @@ -66,10 +67,23 @@ abstract contract MintAndBurnTokenManagerDeployer { return MintAndBurnTokenManagerUpgradeableV3(address(proxy)); } + function deployMintAndBurnTokenManagerV4( + address chainGateway, + uint fees + ) public returns (MintAndBurnTokenManagerUpgradeableV4) { + MintAndBurnTokenManagerUpgradeableV3 proxy = deployMintAndBurnTokenManagerV3( + chainGateway, + fees + ); + address newImplementation = address( + new MintAndBurnTokenManagerUpgradeableV4() + ); + return MintAndBurnTokenManagerUpgradeableV4(address(proxy)); + } function deployLatestMintAndBurnTokenManager( address chainGateway, uint fees - ) public returns (MintAndBurnTokenManagerUpgradeableV3) { - return deployMintAndBurnTokenManagerV3(chainGateway, fees); + ) public returns (MintAndBurnTokenManagerUpgradeableV4) { + return deployMintAndBurnTokenManagerV4(chainGateway, fees); } } diff --git a/smart-contracts/test/zilbridge/TokenManagerDeployers/LockProxyTokenManagerDeployer.sol b/smart-contracts/test/zilbridge/TokenManagerDeployers/LockProxyTokenManagerDeployer.sol index 982db58..6de1f6b 100644 --- a/smart-contracts/test/zilbridge/TokenManagerDeployers/LockProxyTokenManagerDeployer.sol +++ b/smart-contracts/test/zilbridge/TokenManagerDeployers/LockProxyTokenManagerDeployer.sol @@ -3,6 +3,7 @@ pragma solidity 0.8.20; import {ERC1967Proxy} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; import {LockProxyTokenManagerUpgradeableV3} from "contracts/periphery/TokenManagerV3/LockProxyTokenManagerUpgradeableV3.sol"; +import {LockProxyTokenManagerUpgradeableV4} from "contracts/periphery/TokenManagerV4/LockProxyTokenManagerUpgradeableV4.sol"; import {LockProxyTokenManagerUpgradeable} from "contracts/periphery/LockProxyTokenManagerUpgradeable.sol"; abstract contract LockProxyTokenManagerDeployer { @@ -29,7 +30,18 @@ abstract contract LockProxyTokenManagerDeployer { return LockProxyTokenManagerUpgradeableV3(address(proxy)); } - function deployLatestLockProxyTokenManager(address chainGateway, address lockProxy, address lockProxyProxy, uint fees) public returns (LockProxyTokenManagerUpgradeableV3) { - return deployLockProxyTokenManagerV3(chainGateway, lockProxy, lockProxyProxy, fees); + function deployLockProxyTokenManagerV4( + address chainGateway, + address lockProxyAddress, + address lockProxyProxyAddress, + uint fees) public returns (LockProxyTokenManagerUpgradeableV4) { + LockProxyTokenManagerUpgradeableV3 proxy = deployLockProxyTokenManagerV3(chainGateway, lockProxyAddress, lockProxyProxyAddress, fees); + address newImplementation = address(new LockProxyTokenManagerUpgradeableV4()); + proxy.upgradeToAndCall(newImplementation, ""); + return LockProxyTokenManagerUpgradeableV4(address(proxy)); + } + + function deployLatestLockProxyTokenManager(address chainGateway, address lockProxy, address lockProxyProxy, uint fees) public returns (LockProxyTokenManagerUpgradeableV4) { + return deployLockProxyTokenManagerV4(chainGateway, lockProxy, lockProxyProxy, fees); } } diff --git a/smart-contracts/test/zilbridge/ZilBridgeTokenIntegrationFixture.t.sol b/smart-contracts/test/zilbridge/ZilBridgeTokenIntegrationFixture.t.sol index 18928a9..664ffd2 100644 --- a/smart-contracts/test/zilbridge/ZilBridgeTokenIntegrationFixture.t.sol +++ b/smart-contracts/test/zilbridge/ZilBridgeTokenIntegrationFixture.t.sol @@ -4,8 +4,8 @@ pragma solidity 0.8.20; import "forge-std/console.sol"; import {Tester, Vm} from "test/Tester.sol"; import {ITokenManagerStructs, TokenManagerUpgradeable} from "contracts/periphery/TokenManagerUpgradeable.sol"; -import {LockAndReleaseTokenManagerUpgradeableV3} from "contracts/periphery/TokenManagerV3/LockAndReleaseTokenManagerUpgradeableV3.sol"; -import {MintAndBurnTokenManagerUpgradeableV3} from "contracts/periphery/TokenManagerV3/MintAndBurnTokenManagerUpgradeableV3.sol"; +import {LockAndReleaseOrNativeTokenManagerUpgradeableV4} from "contracts/periphery/TokenManagerV4/LockAndReleaseOrNativeTokenManagerUpgradeableV4.sol"; +import {MintAndBurnTokenManagerUpgradeableV4} from "contracts/periphery/TokenManagerV4/MintAndBurnTokenManagerUpgradeableV4.sol"; import {BridgedToken} from "contracts/periphery/BridgedToken.sol"; import { LockProxyProxy } from "contracts/periphery/LockProxyProxy.sol"; import {CallMetadata, IRelayerEvents} from "contracts/core/Relayer.sol"; @@ -13,10 +13,10 @@ import {ValidatorManager} from "contracts/core/ValidatorManager.sol"; import {ChainGateway} from "contracts/core/ChainGateway.sol"; import {MessageHashUtils} from "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol"; import {TestToken} from "test/Helpers.sol"; -import {LockProxyTokenManagerUpgradeableV3} from "contracts/periphery/TokenManagerV3/LockProxyTokenManagerUpgradeableV3.sol"; +import {LockProxyTokenManagerUpgradeableV4} from "contracts/periphery/TokenManagerV4/LockProxyTokenManagerUpgradeableV4.sol"; import {LockProxyTokenManagerDeployer} from "test/zilbridge/TokenManagerDeployers/LockProxyTokenManagerDeployer.sol"; import {MintAndBurnTokenManagerDeployer} from "test/periphery/TokenManagerDeployers/MintAndBurnTokenManagerDeployer.sol"; -import {LockAndReleaseTokenManagerDeployer} from "test/periphery/TokenManagerDeployers/LockAndReleaseTokenManagerDeployer.sol"; +import {LockAndReleaseOrNativeTokenManagerDeployer} from "test/periphery/TokenManagerDeployers/LockAndReleaseOrNativeTokenManagerDeployer.sol"; import { SwitcheoToken } from "test/zilbridge/tokens/switcheo/tokens/SwitcheoTokenETH.sol"; import { ZilBridgeFixture } from "test/zilbridge/DeployZilBridge.t.sol"; import { MockLockProxy } from "./MockLockProxy.sol"; @@ -29,7 +29,7 @@ import { MockLockProxy } from "./MockLockProxy.sol"; * Since the word "native" is quite heavily overloaded, we use "gas" to describe the gas token - ETH on ethereum, for example. */ contract ZilBridgeTokenBridgeIntegrationFixture is -Tester, IRelayerEvents, LockAndReleaseTokenManagerDeployer, LockProxyTokenManagerDeployer, ZilBridgeFixture { +Tester, IRelayerEvents, LockAndReleaseOrNativeTokenManagerDeployer, LockProxyTokenManagerDeployer, ZilBridgeFixture { using MessageHashUtils for bytes; // Gateway shared between the two chains @@ -41,7 +41,7 @@ Tester, IRelayerEvents, LockAndReleaseTokenManagerDeployer, LockProxyTokenManage uint originalTokenSupply = 1000 ether; uint fees = 0.1 ether; - LockProxyTokenManagerUpgradeableV3 sourceTokenManager; + LockProxyTokenManagerUpgradeableV4 sourceTokenManager; LockProxyProxy lockProxyProxy; // There are "actually" three of these - native (which is lock/release), a mint/burn token and a conventional token. @@ -54,7 +54,7 @@ Tester, IRelayerEvents, LockAndReleaseTokenManagerDeployer, LockProxyTokenManage // see doc/zilbridge.md MockLockProxy mockRemoteLockProxy; LockProxyProxy remoteLockProxyProxy; - LockProxyTokenManagerUpgradeableV3 remoteTokenManager; + LockProxyTokenManagerUpgradeableV4 remoteTokenManager; SwitcheoToken remoteNativelyOnSource; SwitcheoToken remoteBridgedGasToken; TestToken nativelyOnRemote;