Skip to content

Commit

Permalink
made lint and slither happy
Browse files Browse the repository at this point in the history
  • Loading branch information
Foivos committed Dec 23, 2024
1 parent 5bfbc66 commit 55b7313
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
6 changes: 6 additions & 0 deletions contracts/InterchainTokenFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -411,12 +411,18 @@ contract InterchainTokenFactory is IInterchainTokenFactory, ITokenManagerType, M

function _checkToken(address tokenAddress) internal view {
IERC20Named token = IERC20Named(tokenAddress);

// slither-disable-next-line unused-return
try token.name() {} catch {
revert NotToken(tokenAddress);
}

// slither-disable-next-line unused-return
try token.symbol() {} catch {
revert NotToken(tokenAddress);
}

// slither-disable-next-line unused-return
try token.decimals() {} catch {
revert NotToken(tokenAddress);
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/TokenHandler.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity ^0.8.0;

import { ITokenHandler } from './interfaces/ITokenHandler.sol';
import { IERC20 } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IERC20.sol';
import { SafeTokenTransfer, SafeTokenTransferFrom, SafeTokenCall } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/libs/SafeTransfer.sol';
import { SafeTokenTransferFrom, SafeTokenCall } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/libs/SafeTransfer.sol';
import { ReentrancyGuard } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/utils/ReentrancyGuard.sol';
import { Create3AddressFixed } from './utils/Create3AddressFixed.sol';

Expand Down
7 changes: 6 additions & 1 deletion test/InterchainTokenFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,12 @@ describe('InterchainTokenFactory', () => {
});

it('Should not register a non-existing token', async () => {
await expectRevert((gasOptions) => tokenFactory.registerCanonicalInterchainToken(tokenFactory.address, { gasOptions }), tokenFactory, "NotToken", [tokenFactory.address])
await expectRevert(
(gasOptions) => tokenFactory.registerCanonicalInterchainToken(tokenFactory.address, { gasOptions }),
tokenFactory,
'NotToken',
[tokenFactory.address],
);
});

it('Should initiate a remote interchain token deployment with no original chain name provided', async () => {
Expand Down

0 comments on commit 55b7313

Please sign in to comment.