Skip to content

Commit

Permalink
Change an error a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
Foivos committed Dec 20, 2024
1 parent 046e362 commit d0fa462
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion contracts/InterchainTokenFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ contract InterchainTokenFactory is IInterchainTokenFactory, ITokenManagerType, M
* @notice Deploys a new interchain token with specified parameters.
* @dev Creates a new token and optionally mints an initial amount to a specified minter.
* This function is `payable` because non-payable functions cannot be called in a multicall that calls other `payable` functions.
* Cannot deploy tokens with empty supply and no minter.
* @param salt The unique salt for deploying the token.
* @param name The name of the token.
* @param symbol The symbol of the token.
Expand Down Expand Up @@ -150,7 +151,7 @@ contract InterchainTokenFactory is IInterchainTokenFactory, ITokenManagerType, M

minterBytes = minter.toBytes();
} else {
revert EmptyInterchainToken();
revert ZeroSupplyToken();
}

tokenId = _deployInterchainToken(deploySalt, currentChain, name, symbol, decimals, minterBytes, gasValue);
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IInterchainTokenFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interface IInterchainTokenFactory is IUpgradable, IMulticall {
error NotSupported();
error RemoteDeploymentNotApproved();
error InvalidTokenId(bytes32 tokenId, bytes32 expectedTokenId);
error EmptyInterchainToken();
error ZeroSupplyToken();

/// @notice Emitted when a minter approves a deployer for a remote interchain token deployment that uses a custom destinationMinter address.
event DeployRemoteInterchainTokenApproval(
Expand Down
2 changes: 1 addition & 1 deletion test/InterchainTokenFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ describe('InterchainTokenFactory', () => {
await expectRevert(
(gasOptions) => tokenFactory.deployInterchainToken(salt, name, symbol, decimals, 0, AddressZero, { gasOptions }),
tokenFactory,
'EmptyInterchainToken',
'ZeroSupplyToken',
[],
);
});
Expand Down

0 comments on commit d0fa462

Please sign in to comment.