From ecb312a60e971f6ad45c072475e42fae06ac7c89 Mon Sep 17 00:00:00 2001 From: Anjan Roy Date: Wed, 24 Feb 2021 15:20:51 +0530 Subject: [PATCH] new: flattened updated contract --- flat/RootChainManager.sol | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/flat/RootChainManager.sol b/flat/RootChainManager.sol index 0f18fbac..57576d07 100644 --- a/flat/RootChainManager.sol +++ b/flat/RootChainManager.sol @@ -1934,12 +1934,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" @@ -2054,7 +2055,7 @@ contract RootChainManager is ITokenPredicate(predicateAddress).exitTokens( _msgSender(), - childToRootToken[childToken], + rootToken, logRLP.toRlpBytes() ); }