Skip to content

Commit

Permalink
refactor(Factory): removing token transfer functions
Browse files Browse the repository at this point in the history
  • Loading branch information
re1ro committed Dec 5, 2023
1 parent c7b6a01 commit ef21d3c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion contracts/InterchainTokenFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
4 changes: 2 additions & 2 deletions test/InterchainTokenFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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);
});
Expand Down

0 comments on commit ef21d3c

Please sign in to comment.