Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ahramy committed Sep 18, 2024
1 parent f3f8f98 commit a100d8c
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions contracts/InterchainTokenFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -201,15 +201,8 @@ contract InterchainTokenFactory is IInterchainTokenFactory, ITokenManagerType, M
string memory destinationChain,
uint256 gasValue
) external payable returns (bytes32 tokenId) {
bytes32 chainNameHash_;

if (bytes(originalChainName).length == 0) {
chainNameHash_ = chainNameHash;
} else {
revert NotSupported();
}

tokenId = _deployRemoteInterchainToken(chainNameHash_, salt, minter, destinationChain, gasValue);
if (bytes(originalChainName).length != 0) revert NotSupported();
tokenId = _deployRemoteInterchainToken(chainNameHash, salt, minter, destinationChain, gasValue);
}

/**
Expand Down Expand Up @@ -333,15 +326,8 @@ contract InterchainTokenFactory is IInterchainTokenFactory, ITokenManagerType, M
string calldata destinationChain,
uint256 gasValue
) external payable returns (bytes32 tokenId) {
bytes32 chainNameHash_;

if (bytes(originalChain).length == 0) {
chainNameHash_ = chainNameHash;
} else {
revert NotSupported();
}

tokenId = _deployRemoteCanonicalInterchainToken(chainNameHash_, originalTokenAddress, destinationChain, gasValue);
if (bytes(originalChain).length != 0) revert NotSupported();
tokenId = _deployRemoteCanonicalInterchainToken(chainNameHash, originalTokenAddress, destinationChain, gasValue);
}

/**
Expand Down

0 comments on commit a100d8c

Please sign in to comment.