diff --git a/contracts/root/RootChainManager/RootChainManager.sol b/contracts/root/RootChainManager/RootChainManager.sol index 009092f3..b232b27a 100644 --- a/contracts/root/RootChainManager/RootChainManager.sol +++ b/contracts/root/RootChainManager/RootChainManager.sol @@ -287,12 +287,13 @@ contract RootChainManager is address rootToken, bytes memory depositData ) private { + bytes32 tokenType = tokenToType[rootToken]; require( rootToChildToken[rootToken] != address(0x0) && - tokenToType[rootToken] != 0, + tokenType != 0, "RootChainManager: TOKEN_NOT_MAPPED" ); - address predicateAddress = typeToPredicate[tokenToType[rootToken]]; + address predicateAddress = typeToPredicate[tokenType]; require( predicateAddress != address(0), "RootChainManager: INVALID_TOKEN_TYPE" @@ -407,7 +408,7 @@ contract RootChainManager is ITokenPredicate(predicateAddress).exitTokens( _msgSender(), - childToRootToken[childToken], + rootToken, logRLP.toRlpBytes() ); }