Skip to content

Commit a100d8c

Browse files
committed
updated
InterchainTokenFactory.deployRemoteInterchainToken(string,bytes32,address,string,uint256).chainNameHash_ (contracts/InterchainTokenFactory.sol#204) is a local variable never initialized InterchainTokenFactory.deployRemoteCanonicalInterchainToken(string,address,string,uint256).chainNameHash_ (contracts/InterchainTokenFactory.sol#336) is a local variable never initialized
1 parent f3f8f98 commit a100d8c

File tree

1 file changed

+4
-18
lines changed

1 file changed

+4
-18
lines changed

contracts/InterchainTokenFactory.sol

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -201,15 +201,8 @@ contract InterchainTokenFactory is IInterchainTokenFactory, ITokenManagerType, M
201201
string memory destinationChain,
202202
uint256 gasValue
203203
) external payable returns (bytes32 tokenId) {
204-
bytes32 chainNameHash_;
205-
206-
if (bytes(originalChainName).length == 0) {
207-
chainNameHash_ = chainNameHash;
208-
} else {
209-
revert NotSupported();
210-
}
211-
212-
tokenId = _deployRemoteInterchainToken(chainNameHash_, salt, minter, destinationChain, gasValue);
204+
if (bytes(originalChainName).length != 0) revert NotSupported();
205+
tokenId = _deployRemoteInterchainToken(chainNameHash, salt, minter, destinationChain, gasValue);
213206
}
214207

215208
/**
@@ -333,15 +326,8 @@ contract InterchainTokenFactory is IInterchainTokenFactory, ITokenManagerType, M
333326
string calldata destinationChain,
334327
uint256 gasValue
335328
) external payable returns (bytes32 tokenId) {
336-
bytes32 chainNameHash_;
337-
338-
if (bytes(originalChain).length == 0) {
339-
chainNameHash_ = chainNameHash;
340-
} else {
341-
revert NotSupported();
342-
}
343-
344-
tokenId = _deployRemoteCanonicalInterchainToken(chainNameHash_, originalTokenAddress, destinationChain, gasValue);
329+
if (bytes(originalChain).length != 0) revert NotSupported();
330+
tokenId = _deployRemoteCanonicalInterchainToken(chainNameHash, originalTokenAddress, destinationChain, gasValue);
345331
}
346332

347333
/**

0 commit comments

Comments
 (0)