private static string FindAddressOfNewlyCreatedContract(this StructLog createLog, JArray structLogArray, int currentIndex) { var requiredDepth = createLog.Depth + 1; var indexOfNextReturnNode = structLogArray.FirstIndexOf(OpCodes.Return, requiredDepth, currentIndex); if (indexOfNextReturnNode != null) { var indexOfNextNode = indexOfNextReturnNode + 1; if (indexOfNextNode < structLogArray.Count) { var nextLog = structLogArray[indexOfNextNode]; if (nextLog["stack"] is JArray stack) { return(stack.LastOrDefault().ConvertStructLogValueToAddress()); } } } return(null); }