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 befb487 commit a4b3962
Show file tree
Hide file tree
Showing 2 changed files with 5 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 @@ -117,6 +117,7 @@ contract InterchainTokenFactory is IInterchainTokenFactory, ITokenManagerType, M

/**
* @notice Deploys a new interchain token with specified parameters.
* This will revert with `ZeroSupplyToken()` if trying to deploy a token without a minter or initial supply.
* @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.
* @param salt The unique salt for deploying 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
5 changes: 3 additions & 2 deletions 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 Expand Up @@ -67,7 +67,8 @@ interface IInterchainTokenFactory is IUpgradable, IMulticall {
function interchainTokenId(address deployer, bytes32 salt) external view returns (bytes32 tokenId);

/**
* @notice Deploys a new interchain token with specified parameters.
* @notice Deploys a new interchain token with specified parameters.
* This will revert with `ZeroSupplyToken()` if trying to deploy a token without a minter or initial supply.
* @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

0 comments on commit a4b3962

Please sign in to comment.