From ef21d3c473395aff1f2d02b9f564f179552b27c3 Mon Sep 17 00:00:00 2001 From: Kiryl Yermakou Date: Tue, 5 Dec 2023 17:52:50 -0500 Subject: [PATCH] refactor(Factory): removing token transfer functions --- contracts/InterchainTokenFactory.sol | 2 +- test/InterchainTokenFactory.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contracts/InterchainTokenFactory.sol b/contracts/InterchainTokenFactory.sol index f1ffd6cc..5b2f7b10 100644 --- a/contracts/InterchainTokenFactory.sol +++ b/contracts/InterchainTokenFactory.sol @@ -139,7 +139,7 @@ contract InterchainTokenFactory is IInterchainTokenFactory, ITokenManagerType, M IInterchainToken token = IInterchainToken(service.interchainTokenAddress(tokenId)); ITokenManager tokenManager = ITokenManager(service.tokenManagerAddress(tokenId)); - token.mint(minter != address(0) ? minter : sender, initialSupply); + token.mint(sender, initialSupply); token.transferMintership(minter); tokenManager.removeFlowLimiter(address(this)); diff --git a/test/InterchainTokenFactory.js b/test/InterchainTokenFactory.js index 105ea2f5..33c93c66 100644 --- a/test/InterchainTokenFactory.js +++ b/test/InterchainTokenFactory.js @@ -265,7 +265,7 @@ describe('InterchainTokenFactory', () => { .and.to.emit(service, 'TokenManagerDeployed') .withArgs(tokenId, tokenManager.address, MINT_BURN, params) .and.to.emit(token, 'Transfer') - .withArgs(AddressZero, minter, mintAmount) + .withArgs(AddressZero, wallet.address, mintAmount) .and.to.emit(tokenManager, 'RolesAdded') .withArgs(minter, 1 << FLOW_LIMITER_ROLE) .and.to.emit(tokenManager, 'RolesAdded') @@ -280,7 +280,7 @@ describe('InterchainTokenFactory', () => { .withArgs(tokenFactory.address, 1 << FLOW_LIMITER_ROLE); expect(await token.balanceOf(tokenFactory.address)).to.equal(0); - expect(await token.balanceOf(minter)).to.equal(mintAmount); + expect(await token.balanceOf(wallet.address)).to.equal(mintAmount); await checkRoles(tokenManager, minter); });