From b71c1bfba55dcd94d39ded05545e5e202aed6e26 Mon Sep 17 00:00:00 2001 From: Kiryl Yermakou Date: Sun, 5 Nov 2023 03:07:22 -0500 Subject: [PATCH] refactor(ITS): inheriting InterchainAddressValidator (#150) * refactor(ITS): inheriting InterchainAddressValidator * fix(imports): unused interfaces * fix: unused var * style(Solidity): prettier --- DESIGN.md | 2 +- contracts/AddressTracker.sol | 33 ------------ contracts/InterchainTokenFactory.sol | 5 +- contracts/InterchainTokenService.sol | 54 ++++++++++++++----- contracts/interfaces/IAddressTracker.sol | 3 +- .../interfaces/IInterchainTokenFactory.sol | 1 + .../interfaces/IInterchainTokenService.sol | 15 ++---- .../proxies/InterchainTokenServiceProxy.sol | 6 +-- hardhat.config.js | 2 +- package-lock.json | 8 +-- package.json | 2 +- scripts/deploy.js | 32 ++++++----- test/TokenService.js | 51 ++++++------------ 13 files changed, 91 insertions(+), 123 deletions(-) delete mode 100644 contracts/AddressTracker.sol diff --git a/DESIGN.md b/DESIGN.md index 1fb9fc1c..cd167956 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -32,7 +32,7 @@ Most projects that look to go cross-chain nowadays have more complex needs that ## Interchain Address Tracker -We plan to finalize the design of the `InterchainTokenService` but we want to be able to support new chains as they get added to the Axelar Network. For this purpose, the service will ask a separate contract, the [`InterchainAddressTracker`](https://github.com/axelarnetwork/axelar-gmp-sdk-solidity/blob/main/contracts/utils/InterchainAddressTracker.sol) to obtain the destination address for outgoing messages, and for validation of incoming messages. +`InterchainTokenService` inherits the [`InterchainAddressTracker`](https://github.com/axelarnetwork/axelar-gmp-sdk-solidity/blob/main/contracts/utils/InterchainAddressTracker.sol) to support new chains as they get added to the Axelar Network. It's implemented for obtaining the destination address for outgoing messages, and for validation of incoming messages. ## Interchain Token diff --git a/contracts/AddressTracker.sol b/contracts/AddressTracker.sol deleted file mode 100644 index 7be68426..00000000 --- a/contracts/AddressTracker.sol +++ /dev/null @@ -1,33 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.0; - -import { Ownable } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/utils/Ownable.sol'; -import { InterchainAddressTracker } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/utils/InterchainAddressTracker.sol'; - -import { IAddressTracker } from './interfaces/IAddressTracker.sol'; - -contract AddressTracker is IAddressTracker, Ownable, InterchainAddressTracker { - constructor( - address owner_, - string memory chainName_, - string[] memory trustedChainNames, - string[] memory trustedAddresses - ) Ownable(owner_) InterchainAddressTracker(chainName_) { - uint256 length = trustedChainNames.length; - - if (length != trustedAddresses.length) revert LengthMismatch(); - - for (uint256 i; i < length; ++i) { - _setTrustedAddress(trustedChainNames[i], trustedAddresses[i]); - } - } - - function setTrustedAddress(string memory chain, string memory address_) external onlyOwner { - _setTrustedAddress(chain, address_); - } - - function removeTrustedAddress(string memory chain) external onlyOwner { - _removeTrustedAddress(chain); - } -} diff --git a/contracts/InterchainTokenFactory.sol b/contracts/InterchainTokenFactory.sol index 9ff815cf..a54b2e9e 100644 --- a/contracts/InterchainTokenFactory.sol +++ b/contracts/InterchainTokenFactory.sol @@ -30,7 +30,10 @@ contract InterchainTokenFactory is IInterchainTokenFactory, ITokenManagerType, M constructor(address interchainTokenServiceAddress) { if (interchainTokenServiceAddress == address(0)) revert ZeroAddress(); service = IInterchainTokenService(interchainTokenServiceAddress); - string memory chainName_ = IInterchainTokenService(interchainTokenServiceAddress).interchainAddressTracker().chainName(); + string memory chainName_ = IInterchainTokenService(interchainTokenServiceAddress).chainName(); + + if (bytes(chainName_).length == 0) revert InvalidChainName(); + chainNameHash = keccak256(bytes(chainName_)); } diff --git a/contracts/InterchainTokenService.sol b/contracts/InterchainTokenService.sol index b686fef8..af7692e2 100644 --- a/contracts/InterchainTokenService.sol +++ b/contracts/InterchainTokenService.sol @@ -12,8 +12,8 @@ import { SafeTokenTransferFrom } from '@axelar-network/axelar-gmp-sdk-solidity/c import { AddressBytes } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/libs/AddressBytes.sol'; import { StringToBytes32, Bytes32ToString } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/libs/Bytes32String.sol'; import { Multicall } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/utils/Multicall.sol'; -import { IInterchainAddressTracker } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IInterchainAddressTracker.sol'; import { Pausable } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/utils/Pausable.sol'; +import { InterchainAddressTracker } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/utils/InterchainAddressTracker.sol'; import { IInterchainTokenService } from './interfaces/IInterchainTokenService.sol'; import { ITokenManagerDeployer } from './interfaces/ITokenManagerDeployer.sol'; @@ -37,6 +37,7 @@ contract InterchainTokenService is Multicall, Create3Address, ExpressExecutorTracker, + InterchainAddressTracker, IInterchainTokenService { using StringToBytes32 for string; @@ -60,8 +61,6 @@ contract InterchainTokenService is address internal immutable implementationLockUnlock; address internal immutable implementationLockUnlockFee; - IInterchainAddressTracker public immutable interchainAddressTracker; - bytes32 internal constant PREFIX_INTERCHAIN_TOKEN_ID = keccak256('its-interchain-token-id'); bytes32 internal constant PREFIX_INTERCHAIN_TOKEN_SALT = keccak256('its-interchain-token-salt'); @@ -83,7 +82,7 @@ contract InterchainTokenService is * @param interchainTokenDeployer_ the address of the InterchainTokenDeployer. * @param gateway_ the address of the AxelarGateway. * @param gasService_ the address of the AxelarGasService. - * @param interchainAddressTracker_ the address of the InterchainAddressTracker. + * @param chainName_ the name of the chain that this contract is deployed on. * @param tokenManagerImplementations this needs to have implementations in the order: Mint-burn, Mint-burn from, Lock-unlock, and Lock-unlock with fee. */ constructor( @@ -91,11 +90,10 @@ contract InterchainTokenService is address interchainTokenDeployer_, address gateway_, address gasService_, - address interchainAddressTracker_, + string memory chainName_, address[] memory tokenManagerImplementations ) { if ( - interchainAddressTracker_ == address(0) || gasService_ == address(0) || tokenManagerDeployer_ == address(0) || interchainTokenDeployer_ == address(0) || @@ -103,19 +101,17 @@ contract InterchainTokenService is ) revert ZeroAddress(); gateway = IAxelarGateway(gateway_); - interchainAddressTracker = IInterchainAddressTracker(interchainAddressTracker_); gasService = IAxelarGasService(gasService_); tokenManagerDeployer = tokenManagerDeployer_; interchainTokenDeployer = interchainTokenDeployer_; if (tokenManagerImplementations.length != uint256(type(TokenManagerType).max) + 1) revert LengthMismatch(); + if (bytes(chainName_).length == 0) revert InvalidChainName(); implementationMintBurn = _sanitizeTokenManagerImplementation(tokenManagerImplementations, TokenManagerType.MINT_BURN); implementationMintBurnFrom = _sanitizeTokenManagerImplementation(tokenManagerImplementations, TokenManagerType.MINT_BURN_FROM); implementationLockUnlock = _sanitizeTokenManagerImplementation(tokenManagerImplementations, TokenManagerType.LOCK_UNLOCK); implementationLockUnlockFee = _sanitizeTokenManagerImplementation(tokenManagerImplementations, TokenManagerType.LOCK_UNLOCK_FEE); - - string memory chainName_ = interchainAddressTracker.chainName(); chainNameHash = keccak256(bytes(chainName_)); } @@ -129,7 +125,7 @@ contract InterchainTokenService is * @param sourceAddress the address that the call came from. */ modifier onlyRemoteService(string calldata sourceChain, string calldata sourceAddress) { - if (!interchainAddressTracker.isTrustedAddress(sourceChain, sourceAddress)) revert NotRemoteService(); + if (!isTrustedAddress(sourceChain, sourceAddress)) revert NotRemoteService(); _; } @@ -471,6 +467,23 @@ contract InterchainTokenService is } } + /** + * @notice Used to set a trusted address for a chain. + * @param chain the chain to set the trusted address of. + * @param address_ the address to set as trusted. + */ + function setTrustedAddress(string memory chain, string memory address_) external onlyOwner { + _setTrustedAddress(chain, address_); + } + + /** + * @notice Used to remove a trusted address for a chain. + * @param chain the chain to set the trusted address of. + */ + function removeTrustedAddress(string memory chain) external onlyOwner { + _removeTrustedAddress(chain); + } + /** * @notice Allows the owner to pause/unpause the token service. * @param paused whether to pause or unpause. @@ -488,7 +501,22 @@ contract InterchainTokenService is \****************/ function _setup(bytes calldata params) internal override { - _addOperator(params.toAddress()); + (address operator, string memory chainName_, string[] memory trustedChainNames, string[] memory trustedAddresses) = abi.decode( + params, + (address, string, string[], string[]) + ); + uint256 length = trustedChainNames.length; + + if (operator == address(0)) revert ZeroAddress(); + if (bytes(chainName_).length == 0) revert InvalidChainName(); + if (length != trustedAddresses.length) revert LengthMismatch(); + + _addOperator(operator); + _setChainName(chainName_); + + for (uint256 i; i < length; ++i) { + _setTrustedAddress(trustedChainNames[i], trustedAddresses[i]); + } } function _sanitizeTokenManagerImplementation( @@ -659,8 +687,8 @@ contract InterchainTokenService is * @param gasValue The amount of gas to be paid for the transaction */ function _callContract(string calldata destinationChain, bytes memory payload, uint256 gasValue) internal { - string memory destinationAddress = interchainAddressTracker.trustedAddress(destinationChain); - if (bytes(destinationAddress).length == 0) revert UntrustedChain(destinationChain); + string memory destinationAddress = trustedAddress(destinationChain); + if (bytes(destinationAddress).length == 0) revert UntrustedChain(); if (gasValue > 0) { gasService.payNativeGasForContractCall{ value: gasValue }( diff --git a/contracts/interfaces/IAddressTracker.sol b/contracts/interfaces/IAddressTracker.sol index 7abc1a52..2b17f302 100644 --- a/contracts/interfaces/IAddressTracker.sol +++ b/contracts/interfaces/IAddressTracker.sol @@ -2,10 +2,9 @@ pragma solidity ^0.8.0; -import { IOwnable } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IOwnable.sol'; import { IInterchainAddressTracker } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IInterchainAddressTracker.sol'; -interface IAddressTracker is IOwnable, IInterchainAddressTracker { +interface IAddressTracker is IInterchainAddressTracker { /** * @dev Sets the trusted address for the specified chain * @param chain Chain name to be trusted diff --git a/contracts/interfaces/IInterchainTokenFactory.sol b/contracts/interfaces/IInterchainTokenFactory.sol index 870745fa..94761f1b 100644 --- a/contracts/interfaces/IInterchainTokenFactory.sol +++ b/contracts/interfaces/IInterchainTokenFactory.sol @@ -4,6 +4,7 @@ pragma solidity ^0.8.0; interface IInterchainTokenFactory { error ZeroAddress(); + error InvalidChainName(); error NotDistributor(address distributor); error NotOperator(address operator); error NonZeroMintAmount(); diff --git a/contracts/interfaces/IInterchainTokenService.sol b/contracts/interfaces/IInterchainTokenService.sol index 89eec342..2166f4c0 100644 --- a/contracts/interfaces/IInterchainTokenService.sol +++ b/contracts/interfaces/IInterchainTokenService.sol @@ -5,11 +5,11 @@ pragma solidity ^0.8.0; import { IAxelarValuedExpressExecutable } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IAxelarValuedExpressExecutable.sol'; import { IContractIdentifier } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IContractIdentifier.sol'; import { IMulticall } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IMulticall.sol'; -import { IInterchainAddressTracker } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IInterchainAddressTracker.sol'; import { IPausable } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IPausable.sol'; import { ITokenManagerType } from './ITokenManagerType.sol'; import { ITokenManagerImplementation } from './ITokenManagerImplementation.sol'; +import { IAddressTracker } from './IAddressTracker.sol'; interface IInterchainTokenService is ITokenManagerType, @@ -17,11 +17,11 @@ interface IInterchainTokenService is IAxelarValuedExpressExecutable, IPausable, IMulticall, - IContractIdentifier + IContractIdentifier, + IAddressTracker { - error ZeroAddress(); - error LengthMismatch(); error InvalidTokenManagerImplementationType(address implementation); + error InvalidChainName(); error NotRemoteService(); error TokenManagerDoesNotExist(bytes32 tokenId); error NotTokenManager(address caller, address tokenManager); @@ -33,7 +33,6 @@ interface IInterchainTokenService is error InvalidMessageType(uint256 messageType); error InvalidMetadataVersion(uint32 version); error ExecuteWithTokenNotSupported(); - error UntrustedChain(string chainName); error InvalidExpressMessageType(uint256 messageType); event InterchainTransfer(bytes32 indexed tokenId, string destinationChain, bytes destinationAddress, uint256 indexed amount); @@ -84,12 +83,6 @@ interface IInterchainTokenService is ); event InterchainTokenIdClaimed(bytes32 indexed tokenId, address indexed deployer, bytes32 indexed salt); - /** - * @notice Returns the address of the interchain router contract. - * @return interchainAddressTracker_ The interchainAddressTracker. - */ - function interchainAddressTracker() external view returns (IInterchainAddressTracker interchainAddressTracker_); - /** * @notice Returns the address of the token manager deployer contract. * @return tokenManagerDeployerAddress The address of the token manager deployer contract. diff --git a/contracts/proxies/InterchainTokenServiceProxy.sol b/contracts/proxies/InterchainTokenServiceProxy.sol index 69bdfd7b..f8d89535 100644 --- a/contracts/proxies/InterchainTokenServiceProxy.sol +++ b/contracts/proxies/InterchainTokenServiceProxy.sol @@ -16,11 +16,7 @@ contract InterchainTokenServiceProxy is Proxy { * @param implementationAddress Address of the interchain token service implementation * @param owner Address of the owner of the proxy */ - constructor( - address implementationAddress, - address owner, - address operator - ) Proxy(implementationAddress, owner, abi.encodePacked(operator)) {} + constructor(address implementationAddress, address owner, bytes memory setupParams) Proxy(implementationAddress, owner, setupParams) {} /** * @dev Override for the 'contractId' function in FinalProxy. Returns a unique identifier for this contract. diff --git a/hardhat.config.js b/hardhat.config.js index b63513e8..5035e1d8 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -20,7 +20,7 @@ module.exports = { evmVersion: process.env.EVM_VERSION || 'london', optimizer: { enabled: true, - runs: 1000, + runs: 10000, details: { peephole: process.env.COVERAGE === undefined, inliner: process.env.COVERAGE === undefined, diff --git a/package-lock.json b/package-lock.json index 0d49a10c..a915fc15 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "dependencies": { "@axelar-network/axelar-cgp-solidity": "6.1.2", - "@axelar-network/axelar-gmp-sdk-solidity": "5.6.1" + "@axelar-network/axelar-gmp-sdk-solidity": "5.6.2" }, "devDependencies": { "@axelar-network/axelar-chains-config": "~0.1.2", @@ -63,9 +63,9 @@ } }, "node_modules/@axelar-network/axelar-gmp-sdk-solidity": { - "version": "5.6.1", - "resolved": "https://registry.npmjs.org/@axelar-network/axelar-gmp-sdk-solidity/-/axelar-gmp-sdk-solidity-5.6.1.tgz", - "integrity": "sha512-VwRRxI+URTjJd9vstl2DFHSNIUY6Dxk8/49Id8OsypeCfoLDRgngG0F+PFDugwFVu8QZPma21y8lY0qdECdCaQ==", + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/@axelar-network/axelar-gmp-sdk-solidity/-/axelar-gmp-sdk-solidity-5.6.2.tgz", + "integrity": "sha512-lJT1Sily/to5jZHkE3rGtkb8qnurNTFnlz4HwbQec+MtqVgPkY3/SsiPTw7967hmZavAw02eiE1jFSW7XKksZQ==", "engines": { "node": ">=16" } diff --git a/package.json b/package.json index 94cb0351..53a7eaa4 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ }, "dependencies": { "@axelar-network/axelar-cgp-solidity": "6.1.2", - "@axelar-network/axelar-gmp-sdk-solidity": "5.6.1" + "@axelar-network/axelar-gmp-sdk-solidity": "5.6.2" }, "devDependencies": { "@axelar-network/axelar-chains-config": "~0.1.2", diff --git a/scripts/deploy.js b/scripts/deploy.js index e2c1346f..2baa6f35 100644 --- a/scripts/deploy.js +++ b/scripts/deploy.js @@ -1,5 +1,8 @@ const { ethers } = require('hardhat'); -const { Contract } = ethers; +const { + Contract, + utils: { defaultAbiCoder }, +} = ethers; const InterchainTokenServiceProxy = require('../artifacts/contracts/proxies/InterchainTokenServiceProxy.sol/InterchainTokenServiceProxy.json'); const Create3Deployer = require('@axelar-network/axelar-gmp-sdk-solidity/artifacts/contracts/deploy/Create3Deployer.sol/Create3Deployer.json'); const { create3DeployContract, getCreate3Address } = require('@axelar-network/axelar-gmp-sdk-solidity'); @@ -11,16 +14,6 @@ async function deployContract(wallet, contractName, args = []) { return contract; } -async function deployAddressTracker(wallet, chainName, interchainTokenServiceAddress = '', evmChains = []) { - const addressTracker = deployContract(wallet, 'AddressTracker', [ - wallet.address, - chainName, - evmChains, - evmChains.map(() => interchainTokenServiceAddress), - ]); - return addressTracker; -} - async function deployMockGateway(wallet) { const gateway = await deployContract(wallet, 'MockGateway'); return gateway; @@ -38,23 +31,29 @@ async function deployInterchainTokenService( interchainTokenDeployerAddress, gatewayAddress, gasServiceAddress, - remoteAddressValidatorAddress, tokenManagerImplementations, + chainName, + evmChains = [], deploymentKey, operatorAddress = wallet.address, ) { + const interchainTokenServiceAddress = await getCreate3Address(create3DeployerAddress, wallet, deploymentKey); + const implementation = await deployContract(wallet, 'InterchainTokenService', [ tokenManagerDeployerAddress, interchainTokenDeployerAddress, gatewayAddress, gasServiceAddress, - remoteAddressValidatorAddress, + chainName, tokenManagerImplementations, ]); const proxy = await create3DeployContract(create3DeployerAddress, wallet, InterchainTokenServiceProxy, deploymentKey, [ implementation.address, wallet.address, - operatorAddress, + defaultAbiCoder.encode( + ['address', 'string', 'string[]', 'string[]'], + [operatorAddress, chainName, evmChains, evmChains.map(() => interchainTokenServiceAddress)], + ), ]); const service = new Contract(proxy.address, implementation.interface, wallet); return service; @@ -81,7 +80,6 @@ async function deployAll(wallet, chainName, evmChains = [], deploymentKey = 'int const interchainToken = await deployContract(wallet, 'InterchainToken'); const interchainTokenDeployer = await deployContract(wallet, 'InterchainTokenDeployer', [interchainToken.address]); const interchainTokenServiceAddress = await getCreate3Address(create3Deployer.address, wallet, deploymentKey); - const interchainAddressTracker = await deployAddressTracker(wallet, chainName, interchainTokenServiceAddress, evmChains); const tokenManagerImplementations = await deployTokenManagerImplementations(wallet, interchainTokenServiceAddress); const service = await deployInterchainTokenService( @@ -91,8 +89,9 @@ async function deployAll(wallet, chainName, evmChains = [], deploymentKey = 'int interchainTokenDeployer.address, gateway.address, gasService.address, - interchainAddressTracker.address, tokenManagerImplementations.map((impl) => impl.address), + chainName, + evmChains, deploymentKey, ); @@ -101,7 +100,6 @@ async function deployAll(wallet, chainName, evmChains = [], deploymentKey = 'int module.exports = { deployContract, - deployRemoteAddressValidator: deployAddressTracker, deployMockGateway, deployTokenManagerImplementations, deployGasService, diff --git a/test/TokenService.js b/test/TokenService.js index 0cee287a..e76e76e4 100644 --- a/test/TokenService.js +++ b/test/TokenService.js @@ -19,7 +19,6 @@ const { deployMockGateway, deployGasService, deployInterchainTokenService, - deployRemoteAddressValidator, deployTokenManagerImplementations, } = require('../scripts/deploy'); @@ -136,7 +135,6 @@ describe('Interchain Token Service', () => { let interchainToken; let interchainTokenDeployer; let interchainTokenServiceAddress; - let interchainAddressTracker; let tokenManagerImplementations; const chainName = 'Test'; @@ -152,30 +150,9 @@ describe('Interchain Token Service', () => { interchainToken = await deployContract(wallet, 'InterchainToken'); interchainTokenDeployer = await deployContract(wallet, 'InterchainTokenDeployer', [interchainToken.address]); interchainTokenServiceAddress = await getCreate3Address(create3Deployer.address, wallet, deploymentKey); - interchainAddressTracker = await deployRemoteAddressValidator(wallet, interchainTokenServiceAddress, chainName); tokenManagerImplementations = await deployTokenManagerImplementations(wallet, interchainTokenServiceAddress); }); - it('Should revert on invalid remote address validator', async () => { - await expectRevert( - (gasOptions) => - deployInterchainTokenService( - wallet, - create3Deployer.address, - tokenManagerDeployer.address, - interchainTokenDeployer.address, - gateway.address, - gasService.address, - AddressZero, - tokenManagerImplementations.map((impl) => impl.address), - deploymentKey, - gasOptions, - ), - service, - 'ZeroAddress', - ); - }); - it('Should revert on invalid gas service', async () => { await expectRevert( (gasOptions) => @@ -186,8 +163,9 @@ describe('Interchain Token Service', () => { interchainTokenDeployer.address, gateway.address, AddressZero, - interchainAddressTracker.address, tokenManagerImplementations.map((impl) => impl.address), + chainName, + [], deploymentKey, gasOptions, ), @@ -206,8 +184,9 @@ describe('Interchain Token Service', () => { interchainTokenDeployer.address, gateway.address, gasService.address, - interchainAddressTracker.address, tokenManagerImplementations.map((impl) => impl.address), + chainName, + [], deploymentKey, gasOptions, ), @@ -226,8 +205,9 @@ describe('Interchain Token Service', () => { AddressZero, gateway.address, gasService.address, - interchainAddressTracker.address, tokenManagerImplementations.map((impl) => impl.address), + chainName, + [], deploymentKey, gasOptions, ), @@ -246,8 +226,9 @@ describe('Interchain Token Service', () => { interchainTokenDeployer.address, AddressZero, gasService.address, - interchainAddressTracker.address, tokenManagerImplementations.map((impl) => impl.address), + chainName, + [], deploymentKey, gasOptions, ), @@ -268,8 +249,9 @@ describe('Interchain Token Service', () => { interchainTokenDeployer.address, gateway.address, gasService.address, - interchainAddressTracker.address, tokenManagerImplementations.map((impl) => impl.address), + chainName, + [], deploymentKey, gasOptions, ), @@ -288,8 +270,9 @@ describe('Interchain Token Service', () => { interchainTokenDeployer.address, gateway.address, gasService.address, - interchainAddressTracker.address, tokenManagerImplementations.map((impl) => impl.address), + chainName, + [], deploymentKey, ); @@ -316,8 +299,9 @@ describe('Interchain Token Service', () => { interchainTokenDeployer.address, gateway.address, gasService.address, - interchainAddressTracker.address, [...tokenManagerImplementations.map((impl) => impl.address), AddressZero], + chainName, + [], deploymentKey, gasOptions, ), @@ -341,8 +325,9 @@ describe('Interchain Token Service', () => { interchainTokenDeployer.address, gateway.address, gasService.address, - interchainAddressTracker.address, tokenManagerImplementations.map((impl) => impl.address), + chainName, + [], deploymentKey, gasOptions, ), @@ -402,9 +387,7 @@ describe('Interchain Token Service', () => { expect(await tokenManager.hasRole(wallet.address, OPERATOR_ROLE)).to.be.true; - const token = await getContractAt('InterchainToken', tokenAddress, wallet); - - console.log(await token.name()); + await getContractAt('InterchainToken', tokenAddress, wallet); }); it('Should revert when registering a interchain token when service is paused', async () => {