Skip to content

Commit

Permalink
ing
Browse files Browse the repository at this point in the history
  • Loading branch information
milapsheth committed Jan 13, 2025
1 parent fc73a74 commit 6fed66f
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions test/InterchainTokenFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -720,14 +720,16 @@ describe('InterchainTokenFactory', () => {

await service.setTrustedAddress(ITS_HUB_CHAIN_NAME, ITS_HUB_ADDRESS).then((tx) => tx.wait);

await expect(tokenFactory.registerCustomToken(salt, token.address, LOCK_UNLOCK, wallet.address, gasValue, { value: gasValue }))
await expect(
tokenFactory.registerCustomToken(salt, token.address, LOCK_UNLOCK, wallet.address, gasValue, { value: gasValue }),
)
.to.emit(service, 'InterchainTokenIdClaimed')
.withArgs(tokenId, AddressZero, deploySalt)
.to.emit(service, 'TokenManagerDeployed')
.withArgs(tokenId, tokenManagerAddress, LOCK_UNLOCK, params);
});

it('Should deploy a lock_unlock token manager', async () => {
it('Should link token with lock_unlock type', async () => {
const tokenManagerAddress = await service.tokenManagerAddress(tokenId);
const params = defaultAbiCoder.encode(['bytes', 'address'], [wallet.address, token.address]);
const gasValue = 1;
Expand Down Expand Up @@ -761,7 +763,7 @@ describe('InterchainTokenFactory', () => {
expect(tokenAddressFromProxy).to.eq(token.address);
});

it('Should revert when deploying a custom token manager twice', async () => {
it('Should revert when linking a token twice', async () => {
const revertData = keccak256(toUtf8Bytes('AlreadyDeployed()')).substring(0, 10);
await expectRevert(
(gasOptions) => tokenFactory.linkToken(salt, '', token.address, LOCK_UNLOCK, wallet.address, 0, gasOptions),
Expand All @@ -787,7 +789,7 @@ describe('InterchainTokenFactory', () => {
);
});

it('Should deploy a mint_burn token manager', async () => {
it('Should link token with mint_burn type', async () => {
const salt = getRandomBytes32();
const tokenId = await tokenFactory.linkedTokenId(wallet.address, salt);
const tokenManagerAddress = await service.tokenManagerAddress(tokenId);
Expand Down Expand Up @@ -822,7 +824,7 @@ describe('InterchainTokenFactory', () => {
expect(tokenAddressFromProxy).to.eq(token.address);
});

it('Should deploy a mint_burn_from token manager', async () => {
it('Should link token with mint_burn_from type', async () => {
const salt = getRandomBytes32();
const tokenId = await tokenFactory.linkedTokenId(wallet.address, salt);
const tokenManagerAddress = await service.tokenManagerAddress(tokenId);
Expand Down Expand Up @@ -859,7 +861,7 @@ describe('InterchainTokenFactory', () => {
expect(tokenAddressFromProxy).to.eq(token.address);
});

it('Should deploy a lock_unlock_with_fee token manager', async () => {
it('Should link token with lock_unlock_with_fee type', async () => {
const salt = getRandomBytes32();
const tokenId = await tokenFactory.linkedTokenId(wallet.address, salt);
const tokenManagerAddress = await service.tokenManagerAddress(tokenId);
Expand Down Expand Up @@ -896,7 +898,7 @@ describe('InterchainTokenFactory', () => {
expect(tokenAddressFromProxy).to.eq(token.address);
});

it('Should revert when deploying a custom token manager if paused', async () => {
it('Should revert on linking a token if ITS is paused', async () => {
await service.setPauseStatus(true).then((tx) => tx.wait);

await expectRevert(
Expand Down

0 comments on commit 6fed66f

Please sign in to comment.