Skip to content

Commit

Permalink
fix: linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Dean Amiel committed Nov 2, 2023
1 parent b85c9e9 commit 54aa2d7
Showing 1 changed file with 34 additions and 11 deletions.
45 changes: 34 additions & 11 deletions test/TokenService.js
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,15 @@ describe('Interchain Token Service', () => {
});

it('Should initialize a remote standardized token deployment', async () => {
await (await service.deployTokenManager(salt, '', LOCK_UNLOCK, defaultAbiCoder.encode(['bytes', 'address'], ['0x', wallet.address]), 0)).wait();
await (
await service.deployTokenManager(
salt,
'',
LOCK_UNLOCK,
defaultAbiCoder.encode(['bytes', 'address'], ['0x', wallet.address]),
0,
)
).wait();

const tokenId = await service.tokenId(wallet.address, salt);
const payload = defaultAbiCoder.encode(
Expand Down Expand Up @@ -826,8 +834,16 @@ describe('Interchain Token Service', () => {

it('Should initialize a remote custom token manager deployment', async () => {
const salt = getRandomBytes32();

await (await service.deployTokenManager(salt, '', LOCK_UNLOCK, defaultAbiCoder.encode(['bytes', 'address'], ['0x', wallet.address]), 0)).wait();

await (
await service.deployTokenManager(
salt,
'',
LOCK_UNLOCK,
defaultAbiCoder.encode(['bytes', 'address'], ['0x', wallet.address]),
0,
)
).wait();

const tokenId = await service.tokenId(wallet.address, salt);
const gasValue = 1e6;
Expand All @@ -847,16 +863,16 @@ describe('Interchain Token Service', () => {
.withArgs(service.address, destinationChain, service.address, keccak256(payload), payload);
});


it('Should revert on a remote custom token manager deployment if the token manager does does not exist', async () => {
const salt = getRandomBytes32();
const tokenId = await service.tokenId(wallet.address, salt);
const gasValue = 1e6;
const params = '0x1234';
const type = LOCK_UNLOCK;

await expect(service.deployTokenManager(salt, destinationChain, type, params, gasValue, { value: gasValue }))
.to.be.revertedWithCustomError(service, 'TokenManagerDoesNotExist', [tokenId])
await expect(
service.deployTokenManager(salt, destinationChain, type, params, gasValue, { value: gasValue }),
).to.be.revertedWithCustomError(service, 'TokenManagerDoesNotExist', [tokenId]);
});

it('Should revert on remote custom token manager deployment if paused', async () => {
Expand Down Expand Up @@ -893,7 +909,15 @@ describe('Interchain Token Service', () => {
it('Should initialize a remote custom token manager deployment', async () => {
const salt = getRandomBytes32();

await (await service.deployTokenManager(salt, '', LOCK_UNLOCK, defaultAbiCoder.encode(['bytes', 'address'], ['0x', wallet.address]), 0)).wait();
await (
await service.deployTokenManager(
salt,
'',
LOCK_UNLOCK,
defaultAbiCoder.encode(['bytes', 'address'], ['0x', wallet.address]),
0,
)
).wait();

const tokenId = await service.tokenId(wallet.address, salt);
const gasValue = 1e6;
Expand All @@ -920,8 +944,9 @@ describe('Interchain Token Service', () => {
const params = '0x1234';
const type = LOCK_UNLOCK;

await expect(service.deployTokenManager(salt, destinationChain, type, params, gasValue, { value: gasValue }))
.to.be.revertedWithCustomError(service, 'TokenManagerDoesNotExist', [tokenId]);
await expect(
service.deployTokenManager(salt, destinationChain, type, params, gasValue, { value: gasValue }),
).to.be.revertedWithCustomError(service, 'TokenManagerDoesNotExist', [tokenId]);
});

it('Should revert on remote custom token manager deployment if paused', async () => {
Expand All @@ -945,8 +970,6 @@ describe('Interchain Token Service', () => {
tx = await service.setPaused(false);
await tx.wait();
});


});

describe('Receive Remote Token Manager Deployment', () => {
Expand Down

0 comments on commit 54aa2d7

Please sign in to comment.